Skip to content

Commit 371eceb

Browse files
authored
Merge pull request #18 from swiftype/rip-platform-api
Remove Platform API Reference
2 parents 0d5de16 + 397475e commit 371eceb

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -332,38 +332,6 @@ You can also specify a date range for no result queries:
332332

333333
top_no_result_queries = client.analytics_top_no_result_queries('youtube', '2013-01-01', '2013-02-01')
334334

335-
### Platform API
336-
337-
If you've registered your service as a [Swiftype Platform Application](https://swiftype.com/documentation/users), you can use this library to create users and take actions on their behalf. (Learn more about the Platform API [here](https://swiftype.com/documentation/users).)
338-
339-
First, create a client using your application's `client_id` and `client_secret`
340-
341-
platform_client = swiftype.Client(api_key='YOUR_API_KEY', client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET')
342-
343-
To retrieve a list of the users for your application (pass optional `page` and `per_page` arguments for pagination):
344-
345-
platform_client.users()
346-
347-
To create a user that is managed by your application:
348-
349-
platform_client.create_user()
350-
351-
You can also retrieve users by their ID:
352-
353-
platform_client.user(12345)
354-
355-
To allow your users to access their Swiftype dashboard, route them to their unique SSO URL. This is generated using their user ID (note that this URL expires after 5 minutes, so the URL should be generated at the time the user is requesting access to their dashboard to avoid having to re-generate the URL):
356-
357-
platform_client.sso_url(12345)
358-
359-
You can also create resources on behalf of a user. To do this, you'll need the user's `access_token`, which is returned when requesting a User resource.
360-
361-
First, create a client with the user's `access_token` (note that you shouldn't pass an `api_key` here when creating the client, since you want the requests to take effect on the User's account):
362-
363-
user_client = swiftype.Client(access_token='MY_USERS_ACCESS_TOKEN')
364-
365-
All of the same Engine APIs documented above will work with your new `user_client` object, but resources will be created on behalf of the User's account rather than your own.
366-
367335
## Running Tests
368336

369337
pip install -r test_requirements.txt

0 commit comments

Comments
 (0)