Built off Jive API for Leidos Prism Social Networking
Requires requests library
You can use this to make requests to our Jive API
Only requires HTTPBasicAuth
Just use your user name and password to start searching and using the API
Every thing is returned as json objects or lists of json objects for easy navigation. Most of the generic keys are included in the API.
from PrismAPI.Classes import PrismAPI prism = PrismAPI() prism.set_basic_auth("username","pword")
In order to search for key words in people, pass in a list of strings to search. Count and start index have defaults but can be used for paging through results
search = ['programmer'] results = prism.search_people(search,25,0) # returns a json object
Use the next and previous functions to go through pages
search = ['programmer'] results = prism.search_people(search,25,0) # returns a json object more_results = prism.next(results) prev_results = prism.previous(more_results)
Can use get a single person by prism id
me = prism.get_person("user_id")
If you just want to get a simple view of jive information, use the simple_view function
results = prism.search_people(search,25,0) simple_view = prism.simple_view(results)
To post an update to your status:
new_status = 'I am having a good day.' prism.status_update(new_status)
JSON objects
This code here has no warranties. It can be freely distributed and modified to suit your needs.