Skip to content

Commit e004e92

Browse files
author
Michael Lundbøl
committed
Update readme and license
1 parent aeff311 commit e004e92

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) <2015> <E-Crunch Ltd>
3+
Copyright (c) <2015> <Napp A/S>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![Current Version](https://img.shields.io/packagist/v/crunch-accounting/salesforce-api.svg?style=flat-square)](https://packagist.org/packages/crunch-accounting/salesforce-api)
2-
[![License](https://img.shields.io/packagist/l/crunch-accounting/salesforce-api.svg?style=flat-square)](https://packagist.org/packages/crunch-accounting/salesforce-api)
3-
[![Scrutinizer](https://img.shields.io/scrutinizer/g/crunch-accounting/salesforce-api-php-wrapper.svg?style=flat-square)](https://scrutinizer-ci.com/g/crunch-accounting/salesforce-api-php-wrapper/)
4-
[![Travis](https://img.shields.io/travis/crunch-accounting/salesforce-api-php-wrapper.svg?style=flat-square)](https://travis-ci.org/crunch-accounting/salesforce-api-php-wrapper)
1+
[![Current Version](https://img.shields.io/packagist/v/napp/salesforce-api.svg?style=flat-square)](https://packagist.org/packages/napp/salesforce-api)
2+
[![License](https://img.shields.io/packagist/l/napp/salesforce-api.svg?style=flat-square)](https://packagist.org/packages/napp/salesforce-api)
3+
[![Scrutinizer](https://img.shields.io/scrutinizer/g/napp/salesforce-api-wrapper.svg?style=flat-square)](https://scrutinizer-ci.com/g/napp/salesforce-api-wrapper/)
4+
[![Travis](https://img.shields.io/travis/napp/salesforce-api-wrapper.svg?style=flat-square)](https://travis-ci.org/napp/salesforce-api-wrapper)
55

66
# Salesforce PHP Library
77

@@ -24,7 +24,7 @@ ___With User interaction:___
2424
You need to fetch an access token for a user, all followup requests will be performed against this user.
2525

2626
```php
27-
$sfClient = \Crunch\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret', 'v37.0');
27+
$sfClient = \Napp\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret', 'v37.0');
2828

2929
if ( ! isset($_GET['code'])) {
3030

@@ -45,7 +45,7 @@ To use this method you also need the security token to be appended to the passwo
4545
Keep in mind this method is to be used as a replacement for the old API Key workflow.
4646

4747
```php
48-
$sfClient = \Crunch\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret');
48+
$sfClient = \Napp\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret');
4949
$sfClient->login('username', 'passwordAndSecurityTokenAppended');
5050

5151
```
@@ -55,8 +55,8 @@ __Performing an action:__
5555
Once you have an access token you can perform requests against the API.
5656

5757
```php
58-
$sfClient = \Crunch\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret');
59-
$tokenGenerator = new \Crunch\Salesforce\AccessTokenGenerator();
58+
$sfClient = \Napp\Salesforce\Client::create('https://test.salesforce.com/', 'clientid', 'clientsecret');
59+
$tokenGenerator = new \Napp\Salesforce\AccessTokenGenerator();
6060
$accessToken = $tokenGenerator->createFromJson($_SESSION['accessToken']);
6161
$sfClient->setAccessToken($accessToken);
6262

@@ -73,12 +73,12 @@ The client can be configured in two ways, you can call the static create method
7373
details or you can use a configuration object as in the example below. This is useful when you need to resolve
7474
the client out of an ioc container.
7575

76-
The configuration data for the client is passed in through a config file which must implement `\Crunch\Salesforce\ClientConfigInterface`
76+
The configuration data for the client is passed in through a config file which must implement `\Napp\Salesforce\ClientConfigInterface`
7777

7878
For example
7979

8080
```php
81-
class SalesforceConfig implements \Crunch\Salesforce\ClientConfigInterface {
81+
class SalesforceConfig implements \Napp\Salesforce\ClientConfigInterface {
8282

8383
/**
8484
* @return string
@@ -116,14 +116,14 @@ class SalesforceConfig implements \Crunch\Salesforce\ClientConfigInterface {
116116

117117
```
118118

119-
A config class is provided and can be used if needed. `\Crunch\Salesforce\ClientConfig`
119+
A config class is provided and can be used if needed. `\Napp\Salesforce\ClientConfig`
120120

121121

122122
The Salesforce client can then be instantiated with the config object and an instance of the Guzzle v4 client.
123123

124124
```php
125125
$sfConfig = new SalesforceConfig();
126-
$sfClient = new \Crunch\Salesforce\Client($sfConfig, new GuzzleHttp\Client());
126+
$sfClient = new \Napp\Salesforce\Client($sfConfig, new GuzzleHttp\Client());
127127

128128
```
129129

@@ -148,7 +148,7 @@ The token returned from here is the raw data and can be passed to the access tok
148148

149149

150150
```php
151-
$tokenGenerator = new \Crunch\Salesforce\AccessTokenGenerator();
151+
$tokenGenerator = new \Napp\Salesforce\AccessTokenGenerator();
152152
$accessToken = $tokenGenerator->createFromSalesforceResponse($token);
153153

154154
```
@@ -158,10 +158,10 @@ This access token should be stored. A method to store this on the file system is
158158

159159
The example above uses the php session to achieve the same result.
160160

161-
The `LocalFileStore` object needs to be instantiated with access to the token generator and a config class which implements `\Crunch\Salesforce\TokenStore\LocalFileConfigInterface`
161+
The `LocalFileStore` object needs to be instantiated with access to the token generator and a config class which implements `\Napp\Salesforce\TokenStore\LocalFileConfigInterface`
162162

163163
```php
164-
class SFLocalFileStoreConfig implements \Crunch\Salesforce\TokenStore\LocalFileConfigInterface {
164+
class SFLocalFileStoreConfig implements \Napp\Salesforce\TokenStore\LocalFileConfigInterface {
165165

166166
/**
167167
* The path where the file will be stored, no trailing slash, must be writable
@@ -179,7 +179,7 @@ class SFLocalFileStoreConfig implements \Crunch\Salesforce\TokenStore\LocalFileC
179179
The token store can then be created and used to save the access token to the local file system as well as fetching a previously saved token.
180180

181181
```php
182-
$tokenStore = new \Crunch\Salesforce\TokenStore\LocalFile(new \Crunch\Salesforce\AccessTokenGenerator, new SFLocalFileStoreConfig);
182+
$tokenStore = new \Napp\Salesforce\TokenStore\LocalFile(new \Napp\Salesforce\AccessTokenGenerator, new SFLocalFileStoreConfig);
183183

184184
//Save a token
185185
$tokenStore->saveAccessToken($accessToken);
@@ -210,7 +210,7 @@ Before making a request you should instantiate the client as above and then assi
210210

211211
```php
212212
$sfConfig = new SalesforceConfig();
213-
$sfClient = new \Crunch\Salesforce\Client($sfConfig, new \GuzzleHttp\Client());
213+
$sfClient = new \Napp\Salesforce\Client($sfConfig, new \GuzzleHttp\Client());
214214

215215
$sfClient->setAccessToken($accessToken);
216216

@@ -257,10 +257,10 @@ $sfClient->deleteRecord('Lead', '00WL0000008wVl1MDE');
257257
## Errors
258258
If something goes wrong the library will throw an exception.
259259

260-
If its an authentication exception such as an expired token this will be as `Crunch\Salesforce\Exceptions\AuthenticationException`,
260+
If its an authentication exception such as an expired token this will be as `Napp\Salesforce\Exceptions\AuthenticationException`,
261261
you can get the exact details using the methods `getMessage` and `getErrorCode`.
262262

263-
All other errors will be `Crunch\Salesforce\Exceptions\RequestException`, the salesforce error will be in the message
263+
All other errors will be `Napp\Salesforce\Exceptions\RequestException`, the salesforce error will be in the message
264264

265265

266266
```php
@@ -269,12 +269,12 @@ try {
269269
$results = $sfClient->search('SELECT Name, Email FROM Lead Limit 10');
270270
print_r($results);
271271

272-
} catch (\Crunch\Salesforce\Exceptions\RequestException $e) {
272+
} catch (\Napp\Salesforce\Exceptions\RequestException $e) {
273273

274274
echo $e->getMessage();
275275
echo $e->getErrorCode();
276276

277-
} catch (\Crunch\Salesforce\Exceptions\AuthenticationException $e) {
277+
} catch (\Napp\Salesforce\Exceptions\AuthenticationException $e) {
278278

279279
echo $e->getErrorCode();
280280

0 commit comments

Comments
 (0)