Skip to content

maahutch/roamPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roamPy

A python library of API wrapper functions to retrieve data from the roam.plus platform. Includes the Roam python class which has one method corresponding to each API endpoint including, Subscriptions, SubscriptionPeriods, Products and Licenses.

Full documentaion can be found here: roampy.readthedocs.io

Installation

pip install roamPy

Get Started

How to test connection to the Roam server:

from roamPy import Roam
import os

#API Key stored as system variable
token = os.environ.get('Roam_API_Key')

#Instantiate object of Roam class
roam = Roam(url=<base url of roam instance>, token=token)

#Test connection
print(roam.checkHeartbeat())

Successful Connection Output

{'data': None, 'meta': {'message': 'API ready for requests'}}

Request metadata for a given subscription using its id number:


#Return Data for Subscription using ID.
sub = roam.getOneSubscription(id = 'id number')

print(sub)

Retreive data for all subscription periods between two dates:

allSPBetween = roam.getSubscriptionPeriodsBetween(startDate='2020-01-01', endDate='2021-01-01')

print(allSPBetween)

Retreive all licenses and relations:

licRel = roam.getLicenseswRels(['licensePeriods', 'publisher'])

print(licRel)

About

Library to request data from the roam.plus platform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages