Welcome to Python client for Degreed API’s documentation!¶
Python client for Degreed API¶
The Degreed python package to leverage and connect to the Degreed API from python 3.
Free software: Apache Software License 2.0
Documentation: https://degreedClient.readthedocs.io.
Features¶
Users Module
Content Module ( article, books, videos and courses)
Provider Module
Pathways Module
Recommendations Module
Required Learning Module
Completions Module
Certifiable skills Module
Skill Plan Module
Skills Rating Module
Search terms Module
Views Module
Groups Module
Credits¶
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
This package was derived from tonybaloney Anthony Shaw’s open source project for the pathgather python client.
Installation¶
Stable release¶
To install Python client for Degreed API, run this command in your terminal:
$ pip install degreed-client
This is the preferred method to install Python client for Degreed API, as it will always install the most recent stable release. After installing ensure that version 19.1.0 or greater is install, if not please upgrade your version.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for Python client for Degreed API can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/Rmaravanyika/degreedClient
Or download the tarball:
$ curl -OL https://github.com/Rmaravanyika/degreedClient/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
Usage¶
To use Python client for Degreed API in a project:
from degreedClient import DegreedApiClient
The degreed api has got various modules which this client made available, however each module requires a specific scope
for that module. The scope is something similar to this: users:read
it may also look like this: users_read
Degreed confirmed through their documentation that all methods will be supported, well at least for now but l recommend the first method of using a colon as a dimiliter.
To be able to use Degreed’s api you will need the client_id
, client_secret
and also the host
.The client id and client secret are given by Degreed Technical Solutions Specialist. The host has got a development host as well as production host. The hostname uses the format degreed.com
and for betatest(development) it is in the format betatest.degreed.com
.You get all these from Degreed. The API uses OAuth 2.0 protocol’s Client Credentials Flow, you can get more information via Degreed official documentation.
101 usage¶
from degreedClient import DegreedApiClient
import yaml
from pprint import pprint
with open('.profile.yml', 'r') as profile_yml:
config = yaml.load(profile_yml)
client = DegreedApiClient(config['host'], config['client_id'], config['client_secret'], config['scope'] )
Users Module¶
Getting started with user module¶
from degreedClient import DegreedApiClient
from pprint import pprint
client = DegreedApiClient(...)
pprint(client.users.all())
# You can also get a single user via ID as an object
# This means you can get all the user attributes
a_user = client.users.get('<ID>')
user_firstname = a_user.attributes.first_name
print(user_firstname)
API Reference¶
Client object¶
The DegreedClient is used to connect to the API and it offers
Main module.
-
class
degreedClient.client.
DegreedApiClient
(host, client_id, client_secret, scope, proxy=None, skip_ssl_validation=False)[source]¶ Main API client.
-
article
¶ Learning Articles
- Return type
-
book
¶ Learning Books
- Return type
-
certifiableskill
¶ Certifiable Skills
-
completion
¶ Completions
- Return type
-
content
¶ Learning Content
- Return type
-
course
¶ Learning Courses
- Return type
-
group
¶ Groups
- Return type
-
learnings
¶ Required Learnings
-
login
¶ Login
- Return type
-
pathway
¶ Pathways
- Return type
-
provider
¶ Provider
- Return type
-
recommendation
¶ Recommendations
-
results_per_page
= 100¶
-
searchterm
¶ Search Terms
- Return type
degreedClient.search_terms.SearchTermClient
-
skillplan
¶ Skill Plans
- Return type
-
skillrating
¶ Skill Ratings
- Return type
-
theviews
¶ Views of content
- Return type
degreedClient.the_views.TheViewClient
-
userfollower
¶ User Followers
- Return type
-
users
¶ Users
- Return type
-
userskill
¶ User Skills
- Return type
-
video
¶ Learning Videos
- Return type
-
Accessors¶
degreedClient.users module¶
-
class
degreedClient.users.
UserClient
(client)[source]¶ Bases:
object
Users API object
-
all
(per_page=None, next_id=None)[source]¶ Gets all Users.
- Parameters
per_page (
int
) – Amount of content to per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of content.
- Returns
A list of users
- Return type
list
ofdegreedClient.models.user.User
-
create
(employee_id, first_name, last_name, organization_email, password, permission_role, profile_visibility, full_name=None, bio=None, login_disabled=False, restricted=False, real_time_email_notification=False, daily_digest_email=False, weekly_email_digest=False)[source]¶ Create a user.
- Parameters
employee_id (
str
) – The ID of the user to updatefirst_name (
str
) – The first name of the userlast_name (
str
) – The last name of the userorganisation_email (
str
) – The full name of the userpassword – Password used to login, minimum 8 characters, they must include at least one number and a capital letter.
permission_role (
str
) – EitherAdmin
,LearningProfessional
,Manager
orMember
profile_visibility (
str
) – Visibility of the profile, can be Everyone, Organization or Privatefull_name (
str
) – The full name of the userbio (
str
) – Short biografie of the user, max len. 2000 chars.login_disabled (
bool
) – Ability for the user to loginrestricted (
bool
) – Restricts the user to change certain fieldsreal_time_email_notification (
bool
) – Do they want to receive email notificationsdaily_digest_email (
bool
) – Sign up for the daily digest emailweekly_email_digest (
bool
) – Sign up for the weekly digest email
- Returns
An instance
degreedClient.models.user.User
- Return type
-
delete
(id)[source]¶ Delete a user by ID.
- Parameters
id (
str
) – The user ID- Returns
None
- Return type
None
-
get
(id)[source]¶ Fetch a specific user by ID.
- Parameters
id (
str
) – The user id- Returns
An instance
degreedClient.models.user.User
- Return type
-
get_today_learnings
(id)[source]¶ Retrieves all today’s learning for a specific user.
- Parameters
id (
str
) – The user id- Returns
An instance
degreedClient.models.user.User
- Return type
-
get_user_certifiable_skills
(id)[source]¶ Retrieves all certifiable skills for a specific user.
- Parameters
id (
str
) – The user id- Returns
An instance
degreedClient.models.user.User
- Return type
-
get_user_skills
(id)[source]¶ Retrieves all skills for a specific user.
scope
: isuser_skills:read
- Parameters
id (
str
) – The user id- Returns
An instance
degreedClient.models.user.User
- Return type
-
update
(id, employee_id=None, first_name=None, last_name=None, organization_email=None, password=None, permission_role=None, profile_visibility=None, full_name=None, bio=None, login_disabled=False, restricted=False, real_time_email_notification=False, daily_digest_email=False, weekly_email_digest=False)[source]¶ Update an existing user.
- Parameters
id (
str
) – The users idemployee_id (
str
) – The ID of the user to updatefirst_name (
str
) – The first name of the userlast_name (
str
) – The last name of the userorganisation_email (
str
) – The full name of the userpassword – Password used to login, minimum 8 characters, they must include at least one number and a capital letter.
permission_role (
str
) – EitherAdmin
,LearningProfessional
,Manager
orMember
profile_visibility (
str
) – Visibility of the profile, can be Everyone, Organization or Privatefull_name (
str
) – The full name of the userbio (
str
) – Short biografie of the user, max len. 2000 chars.login_disabled (
bool
) – Ability for the user to loginrestricted (
bool
) – Restricts the user to change certain fieldsreal_time_email_notification (
bool
) – Do they want to receive email notificationsdaily_digest_email (
bool
) – Sign up for the daily digest emailweekly_email_digest (
bool
) – Sign up for the weekly digest email
- Returns
An instance
degreedClient.models.user.User
- Return type
-
degreedClient.user_followers module¶
-
class
degreedClient.user_followers.
UserFollowersClient
(client)[source]¶ Bases:
object
User Followers API.
-
all
(start_date=None, end_date=None, per_page=None, next_id=None)[source]¶ Gets all user followers.
- Parameters
start_date (
str
) – start date eg 2018-11-30 A maximum of 7 days apart betweenstart_date
andend_date
end_date (
str
) – end date eg 2018-11-30per_page (
int
) – Get from pagenext_id (
str
) – Supplied to retrieve the next batch of user follower.
- Returns
A list of user followers
- Return type
-
degreedClient.user_skills module¶
-
class
degreedClient.user_skills.
UserSkillClient
(client)[source]¶ Bases:
object
User Skill API.
-
all
(start_date=None, end_date=None, per_page=None, next_id=None)[source]¶ Gets all users skills for the current organisation.
- Parameters
start_date (
str
) – start date eg 2018-11-30 A maximum of 7 days betweenstart_date
andend_date
end_date (
str
) – end date eg 2018-11-30per_page (
int
) – Get from pagenext_id (
str
) – Supplied to retrieve the next batch of user skills.
- Returns
A list of user skills
- Return type
-
degreedClient.content module¶
-
class
degreedClient.content.
ContentClient
(client)[source]¶ Bases:
object
Content API.
-
all
(start_date=None, end_date=None, per_page=None, next_id=None)[source]¶ Gets all content.
- Parameters
per_page (
int
) – Amount of content to per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of content.start_date (
str
) – Content created from this date onend_date (
str
) – Content created till this date
- Returns
A list of content
- Return type
-
degreedClient.articles module¶
-
class
degreedClient.articles.
ArticleClient
(client)[source]¶ Bases:
object
Article Content API.
-
all
(per_page=None, next_id=None)[source]¶ Gets all articles.
- Parameters
per_page (
str
) – Amount of articles per pagenext_id – Supplied to retrieve the next batch of articles
- Returns
A list of articles
- Return type
-
create
(external_id, title, url, num_words, summary=None, image_url=None)[source]¶ Create an article.
- Parameters
external_id (
str
) – The article’s external id, is requiredtitle (
str
) – The article’s title, is requiredurl (
str
) – The article’s url, is requirednum_words (
int
) – The article’s number of words, is requiredsummary (
str
) – The article’s summary,image_url (
str
) – The article’s image url
- Returns
An instance
degreedClient.models.content.Article
- Return type
-
delete
(id)[source]¶ Delete an article by ID.
- Parameters
id (
str
) – The article ID- Returns
None
- Return type
None
-
get
(id)[source]¶ Fetch an article by ID.
- Parameters
id (
str
) – The article id- Returns
An instance
degreedClient.models.content.Article
- Return type
-
update
(id, external_id=None, title=None, url=None, num_words=0, summary=None, image_url=None)[source]¶ Can update contents any of the values as the Create A New Article
- Parameters
id (
str
) – id of the article, is requiredexternal_id (
str
) – The article’s external idtitle (
str
) – The article’s titleurl (
str
) – The article’s urlnum_words (
int
) – The article’s number of wordssummary (
str
) – The article’s summaryimage_url (
str
) – The article’s image url
- Returns
An instance
degreedClient.models.content.Article
- Return type
-
degreedClient.books module¶
-
class
degreedClient.books.
BookClient
(client)[source]¶ Bases:
object
Book Content API.
-
all
(per_page=None, next_id=None)[source]¶ Gets all books.
- Parameters
per_page (
str
) – Amount of books per pagenext_id – Supplied to retrieve the next batch of articles
- Returns
A list of books
- Return type
-
create
(title, external_id, subtitle=None, author=None, pages=0, summary=None, obsolete=None, publish_date=None, language=None, i_s_b_n13=None)[source]¶ Create a Book.
- Parameters
title (
str
) – The book title, is requiredexternal_id (
str
) – The book’s external id, is requiredsubtitle (
str
) – The book’s subtitleauthor (
str
) – The book’s authorpages (
int
) – Amount of pagessummary (
str
) – Short summary of the bookobsolete (
bool
) – If the book should be marked as obsoletepublish_date (
str
) – Date that the book has been publishedlanguage (
str
) – Language of the booki_s_b_n13 (
str
) – Short summary of the book
- Returns
An instance
degreedClient.models.content.Book
- Return type
-
delete
(id)[source]¶ Delete an book by ID.
- Parameters
id (
str
) – The book ID- Returns
None
- Return type
None
-
get
(id)[source]¶ Fetch a book by ID.
- Parameters
id (
str
) – The book id- Returns
An instance
degreedClient.models.content.Book
- Return type
-
update
(id, title=None, external_id=None, subtitle=None, author=None, pages=0, summary=None, obsolete=None, publish_date=None, language=None, i_s_b_n13=None)[source]¶ Update a Book.
- Parameters
id (
str
) – The ID of the book to updatetitle (
str
) – The book title, is requiredexternal_id (
str
) – The book’s external id, is requiredsubtitle (
str
) – The book’s subtitleauthor (
str
) – The book’s authorpages (
int
) – Amount of pagessummary (
str
) – Short summary of the bookobsolete (
bool
) – If the book should be marked as obsoletepublish_date (
str
) – Date that the book has been publishedlanguage (
str
) – Language of the booki_s_b_n13 (
str
) – Short summary of the book
- Returns
An instance
degreedClient.models.content.Book
- Return type
-
degreedClient.courses module¶
-
class
degreedClient.courses.
CourseClient
(client)[source]¶ Bases:
object
Course Content API.
-
all
(per_page=None, next_id=None)[source]¶ Gets all Courses.
- Parameters
per_page (
str
) – Amount of content to per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of content.
- Returns
A list of content
- Return type
-
create
(title, external_id, duration, duration_type, provider_code=None, cost_units=0, cost_unit_type=None, _format=None, difficulty=None, video_url=None, summary=None, url=None, obsolete=False, image_url=None, language=None)[source]¶ Create a Course.
- Parameters
title (
str
) – The course title, is requiredexternal_id (
str
) – The course’s external id, is requiredduration (
int
) – Length of the course. Type is supplied withduration-type
duration_type (
str
) – Seconds, Minutes, Hours or Daysprovider_code (
str
) – Unique provider codecost_units (
int
) – Units for the amount of costcost_unit_type (
str
) – The cost unit type, can be any valuta_format (
str
) – Format the course is takesdifficulty (
str
) – Describing the difficulty of taking the coursevideo_url (
str
) – If the course has a video, supply it heresummary (
str
) – Summary of the courseurl (
str
) – URL location where more information can be foundobsolete (
bool
) – If the course should be marked as obsoleteimage_url (
str
) – Cover image of the courselanguage (
str
) – Spoken language of the course
- Returns
An instance
degreedClient.models.content.Course
- Return type
-
delete
(id)[source]¶ Delete a Course by ID.
- Parameters
id (
str
) – The Course ID- Returns
None
- Return type
None
-
get
(id)[source]¶ Fetch course by ID.
- Parameters
id (
str
) – The course id- Returns
An instance
degreedClient.models.content.Course
- Return type
-
update
(id, title=None, external_id=None, duration=0, duration_type=None, provider_code=None, cost_units=0, cost_unit_type=None, _format=None, difficulty=None, video_url=None, summary=None, url=None, obsolete=False, image_url=None, language=None)[source]¶ Update a Course.
- Parameters
id (
str
) – The ID of the course to updatetitle (
str
) – The course title, is requiredexternal_id (
str
) – The course’s external id, is requiredduration (
int
) – Length of the course. Type is supplied withduration-type
duration_type (
str
) – Seconds, Minutes, Hours or Daysprovider_code (
str
) – Unique provider codecost_units (
int
) – Units for the amount of costcost_unit_type (
str
) – The cost unit type, can be any valuta_format (
str
) – Format the course is takesdifficulty (
str
) – Describing the difficulty of taking the coursevideo_url (
str
) – If the course has a video, supply it heresummary (
str
) – Summary of the courseurl (
str
) – URL location where more information can be foundobsolete (
bool
) – If the course should be marked as obsoleteimage_url (
str
) – Cover image of the courselanguage (
str
) – Spoken language of the course
- Returns
An instance
degreedClient.models.content.Course
- Return type
-
degreedClient.videos module¶
-
class
degreedClient.videos.
VideoClient
(client)[source]¶ Bases:
object
Video Content API.
-
all
(per_page=None, next_id=None)[source]¶ Gets all Videos.
- Parameters
per_page (
int
) – Amount of content to per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of content.
- Returns
A list of Videos
- Return type
-
create
(external_id, title, duration, duration_type, summary=None, url=None, obsolete=None, image_url=None, language=None, publish_date=None)[source]¶ Create a Video Content.
- Parameters
external_id (
str
) – The course’s external id, is requiredtitle (
str
) – The course title, is requiredduration (
int
) – Length of the course. Type is supplied withduration-type
duration_type (
str
) – Seconds, Minutes, Hours or Dayssummary (
str
) – Summary of the videourl (
str
) – URL location where more information can be foundobsolete (
bool
) – If the course should be marked as obsoleteimage_url (
str
) – Cover image of the videolanguage (
str
) – Spoken language of the videopublish_date (
str
) – The date the video is published
- Returns
An instance
degreedClient.models.content.Video
- Return type
-
delete
(id)[source]¶ Delete a video by ID.
- Parameters
id (
str
) – The video ID- Returns
None
- Return type
None
-
get
(id)[source]¶ Fetch a video by ID.
- Parameters
id (
str
) – The video id- Returns
An instance
degreedClient.models.content.Video
- Return type
-
update
(id, external_id=None, title=None, duration=0, duration_type=None, summary=None, url=None, obsolete=None, image_url=None, language=None, publish_date=None)[source]¶ Update a Video Content.
- Parameters
id (
str
) – The ID of the video to updateexternal_id (
str
) – The course’s external id, is requiredtitle (
str
) – The course title, is requiredduration (
int
) – Length of the course. Type is supplied withduration-type
duration_type (
str
) – Seconds, Minutes, Hours or Dayssummary (
str
) – Summary of the videourl (
str
) – URL location where more information can be foundobsolete (
bool
) – If the course should be marked as obsoleteimage_url (
str
) – Cover image of the videolanguage (
str
) – Spoken language of the videopublish_date (
str
) – The date the video is published
- Returns
An instance
degreedClient.models.content.Video
- Return type
-
degreedClient.completions module¶
-
class
degreedClient.completions.
CompletionClient
(client)[source]¶ Bases:
object
Completion API object
-
all
(start_date, end_date, per_page=None, next_id=None)[source]¶ Gets all completions from start to end date.
- Parameters
start_date (
str
) – Get completions from this date on. (YYYY-MON-DAY) a maximum of 7 days betweenstart_date
andend_date
end_date (
str
) – Get completions till this date. (YYYY-MON-DAY)per_page (
str
) – The amount of completions per page. Max. of 1000.next_id (
str
) – Supplied to retrieve the next batch of content.
- Returns
A list of completions
- Return type
-
create
(user_id, user_identifier_type, content_id, content_id_type, content_type, completed_at)[source]¶ Create a new completion.
- Parameters
user_id (
str
) – Unique ID of the user who completed it requireduser_identifier_type (
str
) – Can be either UserId, Email,EmployeeId, AliasUid or AliasEmail. is requiredcontent_id (
str
) – Unique id identifying the contentcontent_id_type (
str
) – Can be either ExternalId, Id or ContentUrlcontent_type (
str
) – Can be either Article, Book, Course, Event or Video is requiredcompleted_at (
str
) – Date when the completion was created is required
- Returns
An instance
degreedClient.degreedClient.models.completion.Completion
- Return type
degreeedClient.degreedClient.models.completion.Completion
-
delete
(id)[source]¶ Delete an book by ID.
- Parameters
id (
str
) – Completion ID to be delectes- Returns
None
- Return type
None
-
get_user_completions
(id)[source]¶ Retrieves all completions for a specific user.
- Parameters
id (
str
) – The user id- Returns
An instance
degreedClient.models.user.User
- Return type
-
get_user_completions_by_email
(email)[source]¶ Retrieves all completions by passing the email.
- Parameters
email (
str
) – The user email- Returns
An instance
degreedClient.models.user.User
- Return type
-
update
(id, user_id=None, user_identifier_type=None, content_id=None, content_id_type=None, content_type=None, completed_at=None)[source]¶ Create a new completion.
- Parameters
user_id (
str
) – Unique ID of the user who completed it requireduser_identifier_type (
str
) – Can be either UserId, Email,EmployeeId, AliasUid or AliasEmail. is requiredcontent_id (
str
) – Unique id identifying the contentcontent_id_type (
str
) – Can be either ExternalId, Id or ContentUrlcontent_type (
str
) – Can be either Article, Book, Course, Event or Video is requiredcompleted_at (
str
) – Date when the completion was created is required
- Returns
An instance
degreedClient.degreedClient.models.completion.Completion
- Return type
degreeedClient.degreedClient.models.completion.Completion
-
degreedClient.certifiable_skills module¶
-
class
degreedClient.certifiable_skills.
CertifiableSkillClient
(client)[source]¶ Bases:
object
Certifiable skills API.
-
all
(per_page=None, next_id=None)[source]¶ Get all certifiable skills.
- Parameters
per_page (
int
) – Amount of certifiable skills per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of user skills.
- Returns
A list of required learnings
- Return type
list
ofdegreedClient.models.certifiable_skill.CertifiableSkill
-
get
(id)[source]¶ Fetch a specific certifiable skill
- Parameters
id (
str
) – id used to get a specific certifiable skill- Returns
An instance
degreedClient.models.certifiable_skill.CertifiableSkill
- Return type
-
degreedClient.groups module¶
-
class
degreedClient.groups.
GroupClient
(client)[source]¶ Bases:
object
Groups API object
-
all
(per_page=None, next_id=None)[source]¶ Get all groups for the current organization
- Parameters
per_page (
int
) – Amount of groups to per page. Max of 1.000next_id – Supplied to retrieve the next batch of groups.
next_id –
str
- Returns
A list of groups
- Return type
list
ofdegreedClient.models.group.Group
-
get
(id)[source]¶ Fetch a specific group for the current organization
- Parameters
id (
str
) – id used to get a specific group- Returns
An instance
degreedClient.models.group.Group
- Return type
-
group_users_list
(id)[source]¶ Fetch a list of users which are a member of this group.
- Parameters
id (
str
) – id used to get a specific group- Returns
An instance
degreedClient.models.group.Group
- Return type
-
degreedClient.pathways module¶
-
class
degreedClient.pathways.
PathwayClient
(client)[source]¶ Bases:
object
Pathway API.
-
all
(start_date=None, end_date=None, per_page=None, next_id=None)[source]¶ Gets all pathways for the current organization.
- Parameters
start_date (
str
) – Get pathways modified from this date on. A maximum of 7 days betweenstart_date
andend_date
end_date (
str
) – Get pathways modified till this date.per_page (
int
) – Amount of pathways per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of pathways.
- Returns
A list of pathways
- Return type
-
get
(id)[source]¶ Fetch all data on a specific pathway.
- Parameters
id (
str
) – The pathway id- Returns
An instance
degreedClient.models.pathway.Pathway
- Return type
-
get_pathway_collaborators
(id)[source]¶ Fetch all collaborators for the selected pathway
- Parameters
id (
str
) – The pathway id- Returns
An instance
degreedClient.models.pathway.Collaborator
- Return type
-
get_pathway_followers
(id)[source]¶ Fetch all followers for the selected pathway.
- Parameters
id (
str
) – The pathway id- Returns
An instance
degreedClient.models.pathway.Follower
- Return type
-
get_pathway_groups
(id)[source]¶ Fetch all groups for the selected pathway
- Parameters
id (
str
) – The pathway id- Returns
An instance
degreedClient.models.pathway.GrpPathway
- Return type
Fetch all tags for the selected pathway
- Parameters
id (
str
) – The pathway id- Returns
An instance
degreedClient.models.pathway.Tag
- Return type
-
degreedClient.providers module¶
-
class
degreedClient.providers.
ProviderClient
(client)[source]¶ Bases:
object
Providers API.
-
all
(per_page=None, next_id=None)[source]¶ Get all providers for the current organization.
- Parameters
per_page (
int
) – Amount of providers per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of groups.
- Returns
A list of providers
- Return type
-
get
(id)[source]¶ Fetch a specific provider.
- Parameters
id (
str
) – The ID of the provider to retrieve- Returns
An instance
degreedClient.models.provider.SpecificProvider
- Return type
-
get_provider_licence
(id)[source]¶ Fetch provider licences for a specific provider
- Parameters
id (
str
) – The unique id of the provider.- Returns
An instance
degreedClient.models.provider.ProviderLicence
- Return type
-
degreedClient.recommendations module¶
-
class
degreedClient.recommendations.
RecommendationClient
(client)[source]¶ Bases:
object
Recommendation API.
-
all
(start_date, end_date, per_page=None, next_id=None)[source]¶ Get all recommendations.
- Parameters
start_date (
str
) – Get recommendations from this date on. eg 2018-11-30 A a maximum of 7 days betweenstart_date
andend_date
end_date (
str
) – Get recommendations till this date. eg 2018-11-30per_page (
int
) – Amount of recommendations per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of recommendations.
- Returns
A list of recommendations
- Return type
-
degreedClient.skills_plan module¶
-
class
degreedClient.skills_plan.
SkillPlanClient
(client)[source]¶ Bases:
object
Skills Plan API.
-
all
(per_page=None, next_id=None)[source]¶ Get all skill plans for the current organization.
- Parameters
start_date (
str
) – start date eg 2018-11-30 A maximum of 7 days part betweenstart_date
andend_date
end_date (
str
) – end date eg 2018-11-30per_page (
int
) – Amount of providers per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of skill plans.
- Returns
A list of skill plans
- Return type
-
get
(id)[source]¶ Fetch a skill plan by ID.
- Parameters
id (
str
) – The ID of the skill plan to retrieve- Returns
An instance
degreedClient.models.skill_plan.SkillPlan
- Return type
-
get_skill_followers
(id)[source]¶ Fetch skill followers ID.
- Parameters
id (
str
) – The unique id of the skill plan.- Returns
An instance
degreedClient.models.skill_plan.SkillFollower
- Return type
-
degreedClient.skills_ratings module¶
-
class
degreedClient.skills_ratings.
SkillRatingClient
(client)[source]¶ Bases:
object
Skill Ratings API.
-
all
(start_date=None, end_date=None, per_page=None, next_id=None)[source]¶ Gets all skills ratings.
- Parameters
start_date (
str
) – start date eg 2018-11-30 A maximum of 7 days between thestart_date
andend_date
end_date (
str
) – end date eg 2018-11-30per_page (
int
) – Amount of skill ratings per page. Max of 1.000.next_id (
strt
) – Supplied to retrieve the next batch of groups.
- Returns
A list of skill ratings
- Return type
-
degreedClient.required_learnings module¶
-
class
degreedClient.required_learnings.
RequiredLearningsClient
(client)[source]¶ Bases:
object
Required Learnings API.
-
all
(start_date, end_date, per_page=None, next_id=None)[source]¶ Gets all learning requirements.
- Parameters
start_date (
str
) – Get required learnings from this date on. eg 2018-11-30start_date
andend_date
can only have a maximum of 7 days apartend_date (
str
) – Get required learnings till this date. eg 2018-11-30per_page (
int
) – Amount of required learnings per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of required learning.
- Returns
A list of required learnings
- Return type
-
degreedClient.logins module¶
-
class
degreedClient.logins.
LoginClient
(client)[source]¶ Bases:
object
Logins API.
-
all
(start_date, end_date, per_page=None, next_id=None)[source]¶ Get all logins for the current organization.
- Parameters
start_date (
str
) – Get logins from this date on. YYYY-MON-DAY A maximum of 7 days betweenstart_date
andend_date
end_date (
str
) – Get logins till this date. YYYY-MON-DAYper_page (
int
) – Amount of logins to per page. Max of 1.000next_id (
str
) – Supplied to retrieve the next batch of groups.
- Returns
A list of logins
- Return type
list
ofpathgather.models.login.Login
-
Models¶
degreedClient.models.user module¶
degreedClient.models.user_follower module¶
degreedClient.models.user_skill module¶
degreedClient.models.content module¶
-
class
degreedClient.models.content.
ArticleAttribute
(title, summary, url, format=None, obsolete=None, image_url=None, language=None, num_words=0, provider_code=None, external_id=None, publish_date=None, created_at=None, modified_at=None)[source]¶ Bases:
object
-
class
degreedClient.models.content.
BookAttribute
(title, subtitle, authors, pages, summary, image_url=None, obsolete=None, publish_date=None, language=None, external_id=None, i_s_b_n13=None, created_at=None, modified_at=None, provider_code=None)[source]¶ Bases:
object
-
class
degreedClient.models.content.
ContentAttribute
(content_type, external_id=None, title=None, summary=None, url=None, format=None, is_obsolete=False, image_url=None, language=None, duration=None, duration_type=None, provider=None, is_internal=False, created_at=None, modified_at=None)[source]¶ Bases:
object
degreedClient.models.completion module¶
-
class
degreedClient.models.completion.
Completion
(id, attributes, links, relationships=None, included=None)[source]¶ Bases:
object
-
class
degreedClient.models.completion.
CompletionAttribute
(employee_id, completed_at=None, added_at=None, points_earned=0, is_verified=False, rating=0, access_method=None)[source]¶ Bases:
object
-
class
degreedClient.models.completion.
CompletionCreationAttributes
(user_id, user_identifier_type, content_id, content_id_type, content_type, completed_at=None, is_verified=False, questions_correct=0, percentile=0, duration=0, involvement_level=None)[source]¶ Bases:
object
degreedClient.models.certifiable_skill module¶
degreedClient.models.group module¶
degreedClient.models.pathway module¶
-
class
degreedClient.models.pathway.
Collaborator
(id, attributes, links, relationships)[source]¶ Bases:
object
-
class
degreedClient.models.pathway.
CollaboratorAttribute
(employee_id, created_at=None)[source]¶ Bases:
object
-
class
degreedClient.models.pathway.
Follower
(id, attributes, links, relationships)[source]¶ Bases:
object
-
class
degreedClient.models.pathway.
FollowerAttribute
(employee_id, created_at=None)[source]¶ Bases:
object
-
class
degreedClient.models.pathway.
GrpPathway
(id, attributes, links, relationships)[source]¶ Bases:
object
-
class
degreedClient.models.pathway.
Pathway
(id, attributes, links, relationships)[source]¶ Bases:
object
degreedClient.models.provider module¶
-
class
degreedClient.models.provider.
Provider
(id, attributes, links, relationships)[source]¶ Bases:
object
-
class
degreedClient.models.provider.
ProviderAttribute
(follower_employee_id, following_employee_id, followed_at=None)[source]¶ Bases:
object
-
class
degreedClient.models.provider.
ProviderLicence
(id, attributes, links, relationships)[source]¶ Bases:
object
degreedClient.models.recommendation module¶
degreedClient.skill_plan module¶
-
class
degreedClient.models.skill_plan.
SkillFollower
(id, attributes, links, relationships)[source]¶ Bases:
object
degreedClient.models.skills_rating module¶
Errors¶
Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs at https://github.com/Rmaravanyika/degreedClient/issues.
If you are reporting a bug, please include:
Your operating system name and version.
Any details about your local setup that might be helpful in troubleshooting.
Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.
Write Documentation¶
Python client for Degreed API could always use more documentation, whether as part of the official Python client for Degreed API docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback¶
The best way to send feedback is to file an issue at https://github.com/Rmaravanyika/degreedClient/issues.
If you are proposing a feature:
Explain in detail how it would work.
Keep the scope as narrow as possible, to make it easier to implement.
Remember that this is a volunteer-driven project, and that contributions are welcome :)
Get Started!¶
Ready to contribute? Here’s how to set up degreedClient for local development.
Fork the degreedClient repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/degreedClient.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv degreedClient $ cd degreedClient/ $ python setup.py develop
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
$ flake8 degreedClient tests $ python setup.py test or py.test $ tox
To get flake8 and tox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
The pull request should include tests.
If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/Rmaravanyika/degreedClient/pull_requests and make sure that the tests pass for all supported Python versions.
Deploying¶
A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:
$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
Travis will then deploy to PyPI if tests pass.
Credits¶
Development Lead¶
Ronald Maravanyika <rmaravanyika@gmail.com>
Contributors¶
None yet. Why not be the first?