Livefyre Python utility classes
Project description
# Livefyre Python Utility Classes [![PyPI version](https://badge.fury.io/py/livefyre.png)](http://badge.fury.io/py/livefyre)
Livefyre’s official library for common server-side tasks necessary for getting Livefyre apps (comments, reviews, etc.) working on your website.
Works with Python versions: 2.7
## Installation
Run this line:
$ pip install livefyre
## Usage
Instantiating a network object:
`python network = Livefyre.get_network('network_name', 'network_key') `
Building a Livefyre token:
`python network.build_livefyre_token() `
Building a user auth token:
`python network.build_user_auth_token('user_id', 'display_name', expires) `
To validate a Livefyre token:
`python network.validate_livefyre_token('lf_token') `
To send Livefyre a user sync url and then have Livefyre pull user data from that url:
`python network.set_user_sync_url('url_template') network.sync_user('user_id') `
Instantiating a site object:
`python site = network.get_site('site_id', 'site_key') `
Building a collection meta token: The {options} argument is optional.
`python site.build_collection_meta_token('title', 'article_id', 'url', {options}) `
Building a checksum: The ‘tags’ argument is optional.
`python site.build_checksum('title', 'url', 'tags') `
To retrieve content collection data:
`python site.get_collection_content('article_id') `
To get a content collection’s id:
`python site.get_collection_id('article_id') `
## Additional Documentation
Located [here](http://answers.livefyre.com/developers/libraries).
## Contributing
Fork it
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am ‘Add some feature’)
Push to the branch (git push origin my-new-feature)
Create new Pull Request
Note: any feature update on any of Livefyre’s libraries will need to be reflected on all libraries. We will try and accommodate when we find a request useful, but please be aware of the time it may take.
## License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for livefyre-1.3.2.macosx-10.6-intel.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | e44807e976d7aacf4833cffdc1f3a588e56ce58d4cfe6f2f30f7a6cc528779e9 |
|
MD5 | 28ee823b36ee043d03d8e27aaa4c0fbc |
|
BLAKE2b-256 | 028555b9980743c98ae65a024e24758c664842b02d8a7b2eb1d71945a71b7eb3 |