Skip to content

Commit cca20f6

Browse files
authored
Merge pull request #9 from adobe-apiplatform/v1
Fix typos (and failed rename) in the ReadMe. Now at 1.0.0rc5. Also put the prod endpoints for getting access tokens in the ReadMe.
2 parents 2b3887e + 89cd54a commit cca20f6

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ The JSON Web Token (JWT) is used to get an authorization token for using the API
6666
The `JWT` object will build the JWT for use with the `AccessRequest` object.
6767

6868
```python
69-
from adobe_umapi_client.auth import JWT
69+
from umapi_client.auth import JWT
7070

7171
jwt = JWT(
7272
org_id, # Organization ID
73-
tech_acct, # Techincal Account ID
73+
tech_acct, # Technical Account ID
7474
ims_host, # IMS Host
7575
api_key, # API Key
7676
open(priv_key_filename, 'r') # Private certificate is passed as a file-like object
@@ -83,7 +83,7 @@ The `AccessRequest` object uses the JWT to call an IMS endpoint to obtain an acc
8383
token is then used in all later UMAPI calls to authenticate and authorize the request.
8484

8585
```python
86-
from adobe_umapi_client.auth import AccessRequest
86+
from umapi_client.auth import AccessRequest
8787

8888
token = AccessRequest(
8989
"https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -107,7 +107,7 @@ Once you have an access `token`, you use it to create an Auth object. This Auth
107107
is used to build the necessary authentication headers for making an API call.
108108

109109
```python
110-
from adobe_umapi_client.auth import Auth
110+
from umapi_client.auth import Auth
111111

112112
auth = Auth(api_key, token())
113113
```
@@ -118,7 +118,7 @@ Once the `auth` object is built, you use it to construct a UMAPI object. This U
118118
object can then be used over and over to make your desired API calls.
119119

120120
```python
121-
from adobe_umapi_client import UMAPI
121+
from umapi_client import UMAPI
122122

123123
api_endpoint = 'https://usermanagement.adobe.io/v2/usermanagement'
124124
api = UMAPI(api_endpoint, auth)
@@ -127,22 +127,23 @@ api = UMAPI(api_endpoint, auth)
127127
# Querying for Users and Groups
128128

129129
These snippets presume you have constructed a UMAPI object named `api` as detailed in the last section.
130-
The query APIs return data in paginated form, each page contaning up to 200 results.
131-
The `adobe_umapi_client.helper`
130+
The query APIs return data in paginated form, each page containing up to 200 results.
131+
The `umapi_client.helper`
132132
module has a `paginate` utility which can will concatenate and return the results from all pages.
133133

134134
## Get a List of Users
135135

136136
```python
137137
users = api.users(org_id, page=0) # optional arg page defaults to 0
138138

139-
from adobe_umapi_client.helper import paginate
139+
from umapi_client.helper import paginate
140140
all_users = paginate(api.users, org_id) # optional args for max_pages and max_records
141141
```
142142

143143
## Get a List of Groups
144144

145-
This list of groups will contain both user groups and product license configuration groups.
145+
This list of groups will contain both user groups and product license
146+
configuration groups.
146147

147148
```python
148149
groups = api.groups(org_id, page=0)
@@ -162,7 +163,7 @@ To create the action object, we name the user we wish to operate on.
162163
(As above, `api` here in a UMAPI object.)
163164

164165
```python
165-
from adobe_umapi_client import Action
166+
from umapi_client import Action
166167

167168
action = Action(user="[email protected]")
168169
```
@@ -447,9 +448,9 @@ The "add" portion of the JSON looks like this:
447448
"add": {"product": ["product1"]}
448449
```
449450

450-
## adobe_umapi_client.auth
451+
## umapi_client.auth
451452

452-
The submodule `adobe_umapi_client.auth` contains the components needed to build
453+
The submodule `umapi_client.auth` contains the components needed to build
453454
the authentication headers needed for API communication.
454455

455456
### JWT
@@ -470,11 +471,11 @@ The `JWT` object is callable. Calling it returns the encoded JWT.
470471
Example:
471472

472473
```python
473-
from adobe_umapi_client.auth import JWT
474+
from umapi_client.auth import JWT
474475

475476
jwt = JWT(
476477
org_id, # Organization ID
477-
tech_acct, # Techincal Account ID
478+
tech_acct, # Technical Account ID
478479
ims_host, # IMS Host
479480
api_key, # API Key
480481
open(priv_key_filename, 'r') # Private certificate is passed as a file-like object
@@ -499,7 +500,10 @@ Like the `JWT` object, the `AccessRequest` object is callable. Calling it retur
499500
Basic Usage Example:
500501

501502
```python
502-
from adobe_umapi_client.auth import AccessRequest
503+
from umapi_client.auth import AccessRequest
504+
505+
ims_host = 'ims-na1.adobelogin.com' # US production host, usable from everywhere
506+
ims_endpoint_jwt = '/ims/exchange/jwt' # path for all environments
503507

504508
token = AccessRequest(
505509
"https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -533,15 +537,15 @@ It is a subclass of the
533537
Example:
534538

535539
```python
536-
from adobe_umapi_client.auth import Auth
540+
from umapi_client.auth import Auth
537541

538542
token = AccessRequest( ... )
539543
auth = Auth(api_key, token())
540544
```
541545

542-
## adobe_umapi_client.error
546+
## umapi_client.error
543547

544-
The `adobe_umapi_client.error` submodule contains all custom Exceptions for the UMAPI library.
548+
The `umapi_client.error` submodule contains all custom Exceptions for the UMAPI library.
545549

546550
### UMAPIError
547551

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
setup(name='umapi-client',
25-
version='1.0.0rc4',
25+
version='1.0.0rc5',
2626
description='Adobe User Management API (UMAPI) client - see https://adobe.ly/2h1pHgV',
2727
long_description=('The Adobe User Management API (aka the Adobe UMAPI) is an Adobe-hosted network service '
2828
'which provides Adobe Enterprise customers the ability to manage their users. This '

0 commit comments

Comments
 (0)