agilix 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.env.sample +4 -0
- data/.gitignore +21 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +99 -0
- data/Rakefile +10 -0
- data/agilix.gemspec +49 -0
- data/bin/console +16 -0
- data/bin/setup +8 -0
- data/lib/agilix.rb +17 -0
- data/lib/agilix/buzz/api.rb +86 -0
- data/lib/agilix/buzz/commands/authentication.rb +21 -0
- data/lib/agilix/buzz/commands/course.rb +17 -0
- data/lib/agilix/buzz/commands/general.rb +15 -0
- data/lib/agilix/version.rb +3 -0
- metadata +217 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 138019275cdce2dd003675e115160d5a5f1feab271410d0261b09a4c6da0f01d
|
4
|
+
data.tar.gz: a752c0e4887be205e3e2486cc920855cc833b8d7ab1bc157e0a3aac49d389685
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c26e8d5a54a0b79516381f510e018ff70891c67687206ab3e7883f6844ee858833ff197fce4b2d68a25f7688666a46041fb52325d2586940bbdd4b8d0ffc8f9e
|
7
|
+
data.tar.gz: 27b8983c763648dcbe06dfeac1cfed27b9509300a2d49678203d269439b97ae5dd7ff3c7e258b35a7b30e8b5c861e4edb47bc72287592efede30e469ae09d271
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.env.sample
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
*.bundle
|
11
|
+
*.so
|
12
|
+
*.o
|
13
|
+
*.a
|
14
|
+
mkmf.log
|
15
|
+
*.sublime-project
|
16
|
+
*.sublime-workspace
|
17
|
+
|
18
|
+
.DS_Store
|
19
|
+
.env
|
20
|
+
.ruby-version
|
21
|
+
.ruby-gemset
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at beneggett@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Ben Eggett
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/agilix.svg)](https://badge.fury.io/rb/agilix)
|
2
|
+
[![Build Status](https://travis-ci.com/beneggett/agilix.svg?branch=master)](https://travis-ci.com/beneggett/agilix)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/beneggett/agilix/badge.svg?branch=master)](https://coveralls.io/github/beneggett/agilix?branch=master)
|
4
|
+
# Agilix Buzz
|
5
|
+
|
6
|
+
Fully Implements the Agilix Buzz API in Ruby
|
7
|
+
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'agilix'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install agilix
|
24
|
+
|
25
|
+
Be sure to define your Agilix Buzz credentials by setting up environment variables in your application appropriately. Refer to the .env.sample file for details.
|
26
|
+
```
|
27
|
+
AGILIX_BUZZ_USERNAME = 'my-username'
|
28
|
+
AGILIX_BUZZ_PASSWORD = 'my-password'
|
29
|
+
```
|
30
|
+
|
31
|
+
Optionally, if your Buzz instance runs on your own url, you can define it as well:
|
32
|
+
|
33
|
+
```
|
34
|
+
AGILIX_BUZZ_URL = 'https://api.mycustomdomain.com'
|
35
|
+
```
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
There are many primary APIs that are wrapped. Below you will see basic examples of how to use them. For more information about what optional query parameters are available, please consult the [Agilix Buzz API Docs](https://api.agilixbuzz.com/)
|
40
|
+
x
|
41
|
+
#### Auth
|
42
|
+
|
43
|
+
You need to authenticate to use the api
|
44
|
+
|
45
|
+
## Features
|
46
|
+
|
47
|
+
Implemented APIs from [Agilix Buzz API Docs](https://api.agilixbuzz.com/)
|
48
|
+
|
49
|
+
(Last updated on March 7, 2019)
|
50
|
+
|
51
|
+
| API | Methods & Docs | Implemented? | Priority |
|
52
|
+
| --- | --- | --- | --- |
|
53
|
+
| Announcements | [DeleteAnnouncements](https://api.agilixbuzz.com/docs/#!/Command/DeleteAnnouncements), [GetAnnouncement](https://api.agilixbuzz.com/docs/#!/Command/GetAnnouncement), [GetAnnouncementInfo](https://api.agilixbuzz.com/docs/#!/Command/GetAnnouncementInfo), [GetAnnouncementList](https://api.agilixbuzz.com/docs/#!/Command/GetAnnouncementList), [GetUserAnnouncementList](https://api.agilixbuzz.com/docs/#!/Command/GetUserAnnouncementList), [ListRestorableAnnouncements](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableAnnouncements), [PutAnnouncement](https://api.agilixbuzz.com/docs/#!/Command/PutAnnouncement), [RestoreAnnouncements](https://api.agilixbuzz.com/docs/#!/Command/RestoreAnnouncements), [UpdateAnnouncementViewed](https://api.agilixbuzz.com/docs/#!/Command/UpdateAnnouncementViewed) | ❌ | 🔼 |
|
54
|
+
| Assessments | [DeleteQuestions](https://api.agilixbuzz.com/docs/#!/Command/DeleteQuestions), [GetAttempt](https://api.agilixbuzz.com/docs/#!/Command/GetAttempt), [GetAttemptReview](https://api.agilixbuzz.com/docs/#!/Command/GetAttemptReview), [GetExam](https://api.agilixbuzz.com/docs/#!/Command/GetExam), [GetNextQuestion](https://api.agilixbuzz.com/docs/#!/Command/GetNextQuestion), [GetQuestion](https://api.agilixbuzz.com/docs/#!/Command/GetQuestion), [GetQuestionScores](https://api.agilixbuzz.com/docs/#!/Command/GetQuestionScores), [GetQuestionStats](https://api.agilixbuzz.com/docs/#!/Command/GetQuestionStats), [GetSubmissionState](https://api.agilixbuzz.com/docs/#!/Command/GetSubmissionState), [ListQuestions](https://api.agilixbuzz.com/docs/#!/Command/ListQuestions), [ListRestorableQuestions](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableQuestions), [PrepareOfflineAttempt](https://api.agilixbuzz.com/docs/#!/Command/PrepareOfflineAttempt), [PutQuestions](https://api.agilixbuzz.com/docs/#!/Command/PutQuestions), [RestoreQuestions](https://api.agilixbuzz.com/docs/#!/Command/RestoreQuestions), [SaveAttemptAnswers](https://api.agilixbuzz.com/docs/#!/Command/SaveAttemptAnswers), [SubmitAttemptAnswers](https://api.agilixbuzz.com/docs/#!/Command/SubmitAttemptAnswers), [SubmitOfflineAttempt](https://api.agilixbuzz.com/docs/#!/Command/SubmitOfflineAttempt) | ❌ | ⏺ |
|
55
|
+
| Authentication | [ExtendSession](https://api.agilixbuzz.com/docs/#!/Command/ExtendSession), [GetKey](https://api.agilixbuzz.com/docs/#!/Command/GetKey), [ForcePasswordChange](https://api.agilixbuzz.com/docs/#!/Command/ForcePasswordChange), [GetPasswordLoginAttemptHistory](https://api.agilixbuzz.com/docs/#!/Command/GetPasswordLoginAttemptHistory), [GetPasswordPolicy](https://api.agilixbuzz.com/docs/#!/Command/GetPasswordPolicy), [GetPasswordQuestion](https://api.agilixbuzz.com/docs/#!/Command/GetPasswordQuestion), [Login2](https://api.agilixbuzz.com/docs/#!/Command/Login2), [Logout](https://api.agilixbuzz.com/docs/#!/Command/Logout), [Proxy](https://api.agilixbuzz.com/docs/#!/Command/Proxy), [PutKey](https://api.agilixbuzz.com/docs/#!/Command/PutKey), [ResetLockout](https://api.agilixbuzz.com/docs/#!/Command/ResetLockout), [ResetPassword](https://api.agilixbuzz.com/docs/#!/Command/ResetPassword), [Unproxy](https://api.agilixbuzz.com/docs/#!/Command/Unproxy), [UpdatePassword](https://api.agilixbuzz.com/docs/#!/Command/UpdatePassword), [UpdatePasswordQuestionAnswer](https://api.agilixbuzz.com/docs/#!/Command/UpdatePasswordQuestionAnswer) | ❌ | 🔼 |
|
56
|
+
| Badges | [CreateBadge](https://api.agilixbuzz.com/docs/#!/Command/CreateBadge), [DeleteBadge](https://api.agilixbuzz.com/docs/#!/Command/DeleteBadge), [GetBadge](https://api.agilixbuzz.com/docs/#!/Command/GetBadge), [GetBadgeAssertion](https://api.agilixbuzz.com/docs/#!/Command/GetBadgeAssertion), [GetBadgeList](https://api.agilixbuzz.com/docs/#!/Command/GetBadgeList) | ❌ | 🔽 |
|
57
|
+
| Blogs | [DeleteBlogs](https://api.agilixbuzz.com/docs/#!/Command/DeleteBlogs), [GetBlog](https://api.agilixbuzz.com/docs/#!/Command/GetBlog), [GetBlogList](https://api.agilixbuzz.com/docs/#!/Command/GetBlogList), [GetBlogSummary](https://api.agilixbuzz.com/docs/#!/Command/GetBlogSummary), [GetRecentPosts](https://api.agilixbuzz.com/docs/#!/Command/GetRecentPosts), [PutBlog](https://api.agilixbuzz.com/docs/#!/Command/PutBlog), [UpdateBlogViewed](https://api.agilixbuzz.com/docs/#!/Command/UpdateBlogViewed) | ❌ | ⏬ |
|
58
|
+
| Command Tokens | [CreateCommandTokens](https://api.agilixbuzz.com/docs/#!/Command/CreateCommandTokens), [GetCommandToken](https://api.agilixbuzz.com/docs/#!/Command/GetCommandToken), [GetCommandTokenInfo](https://api.agilixbuzz.com/docs/#!/Command/GetCommandTokenInfo), [DeleteCommandTokens](https://api.agilixbuzz.com/docs/#!/Command/DeleteCommandTokens), [UpdateCommandTokens](https://api.agilixbuzz.com/docs/#!/Command/UpdateCommandTokens), [ListCommandTokens](https://api.agilixbuzz.com/docs/#!/Command/ListCommandTokens), [RedeemCommandToken](https://api.agilixbuzz.com/docs/#!/Command/RedeemCommandToken) | ❌ | ⏬
|
59
|
+
| Conversion | [ExportData](https://api.agilixbuzz.com/docs/#!/Command/ExportData), [GetConvertedData](https://api.agilixbuzz.com/docs/#!/Command/GetConvertedData), [ImportData](https://api.agilixbuzz.com/docs/#!/Command/ImportData) | ❌ | ⏬ |
|
60
|
+
| Courses | [CopyCourses](https://api.agilixbuzz.com/docs/#!/Command/CopyCourses), [CreateCourses](https://api.agilixbuzz.com/docs/#!/Command/CreateCourses), [CreateDemoCourse](https://api.agilixbuzz.com/docs/#!/Command/CreateDemoCourse), [DeactivateCourse](https://api.agilixbuzz.com/docs/#!/Command/DeactivateCourse), [DeleteCourses](https://api.agilixbuzz.com/docs/#!/Command/DeleteCourses), [GetCourse2](https://api.agilixbuzz.com/docs/#!/Command/GetCourse2), [GetCourseHistory](https://api.agilixbuzz.com/docs/#!/Command/GetCourseHistory), [ListCourses](https://api.agilixbuzz.com/docs/#!/Command/ListCourses), [MergeCourses](https://api.agilixbuzz.com/docs/#!/Command/MergeCourses), [RestoreCourse](https://api.agilixbuzz.com/docs/#!/Command/RestoreCourse), [UpdateCourses](https://api.agilixbuzz.com/docs/#!/Command/UpdateCourses) | ❌ | 🔼 |
|
61
|
+
| Discussion Boards | [DeleteMessage](https://api.agilixbuzz.com/docs/#!/Command/DeleteMessage), [DeleteMessagePart](https://api.agilixbuzz.com/docs/#!/Command/DeleteMessagePart), [GetMessage](https://api.agilixbuzz.com/docs/#!/Command/GetMessage), [GetMessageList](https://api.agilixbuzz.com/docs/#!/Command/GetMessageList), [ListRestorableMessages](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableMessages), [PutMessage](https://api.agilixbuzz.com/docs/#!/Command/PutMessage), [PutMessagePart](https://api.agilixbuzz.com/docs/#!/Command/PutMessagePart), [RestoreMessages](https://api.agilixbuzz.com/docs/#!/Command/RestoreMessages), [SubmitMessage](https://api.agilixbuzz.com/docs/#!/Command/SubmitMessage), [UpdateMessageViewed](https://api.agilixbuzz.com/docs/#!/Command/UpdateMessageViewed) | ❌ | 🔽
|
62
|
+
| Domains | [CreateDomains](https://api.agilixbuzz.com/docs/#!/Command/CreateDomains), [DeleteDomain](https://api.agilixbuzz.com/docs/#!/Command/DeleteDomain), [GetDomain2](https://api.agilixbuzz.com/docs/#!/Command/GetDomain2), [GetDomainContent](https://api.agilixbuzz.com/docs/#!/Command/GetDomainContent), [GetDomainEnrollmentMetrics](https://api.agilixbuzz.com/docs/#!/Command/GetDomainEnrollmentMetrics), [GetDomainParentList](https://api.agilixbuzz.com/docs/#!/Command/GetDomainParentList), [GetDomainSettings](https://api.agilixbuzz.com/docs/#!/Command/GetDomainSettings), [GetDomainStats](https://api.agilixbuzz.com/docs/#!/Command/GetDomainStats), [ListDomains](https://api.agilixbuzz.com/docs/#!/Command/ListDomains), [RestoreDomain](https://api.agilixbuzz.com/docs/#!/Command/RestoreDomain), [UpdateDomains](https://api.agilixbuzz.com/docs/#!/Command/UpdateDomains) | ❌ | ⏫ |
|
63
|
+
| Enrollments | [CreateEnrollments](https://api.agilixbuzz.com/docs/#!/Command/CreateEnrollments), [DeleteEnrollments](https://api.agilixbuzz.com/docs/#!/Command/DeleteEnrollments), [GetEnrollment3](https://api.agilixbuzz.com/docs/#!/Command/GetEnrollment3), [GetEnrollmentActivity](https://api.agilixbuzz.com/docs/#!/Command/GetEnrollmentActivity), [GetEnrollmentGradebook2](https://api.agilixbuzz.com/docs/#!/Command/GetEnrollmentGradebook2), [GetEnrollmentGroupList](https://api.agilixbuzz.com/docs/#!/Command/GetEnrollmentGroupList), [GetEnrollmentMetricsReport](https://api.agilixbuzz.com/docs/#!/Command/GetEnrollmentMetricsReport), [ListEnrollments](https://api.agilixbuzz.com/docs/#!/Command/ListEnrollments), [ListEnrollmentsByTeacher](https://api.agilixbuzz.com/docs/#!/Command/ListEnrollmentsByTeacher), [ListEntityEnrollments](https://api.agilixbuzz.com/docs/#!/Command/ListEntityEnrollments), [ListUserEnrollments](https://api.agilixbuzz.com/docs/#!/Command/ListUserEnrollments), [PutSelfAssessment](https://api.agilixbuzz.com/docs/#!/Command/PutSelfAssessment), [RestoreEnrollment](https://api.agilixbuzz.com/docs/#!/Command/RestoreEnrollment), [UpdateEnrollments](https://api.agilixbuzz.com/docs/#!/Command/UpdateEnrollments) | ❌ | 🔼 |
|
64
|
+
| General | [Echo](https://api.agilixbuzz.com/docs/#!/Command/Echo), [GetCommandList](https://api.agilixbuzz.com/docs/#!/Command/GetCommandList), [GetEntityType](https://api.agilixbuzz.com/docs/#!/Command/GetEntityType), [GetStatus](https://api.agilixbuzz.com/docs/#!/Command/GetStatus), [GetUploadLimits](https://api.agilixbuzz.com/docs/#!/Command/GetUploadLimits), [SendMail](https://api.agilixbuzz.com/docs/#!/Command/SendMail) | ❌ | ⏺ |
|
65
|
+
| Groups | [AddGroupMembers](https://api.agilixbuzz.com/docs/#!/Command/AddGroupMembers), [CreateGroups](https://api.agilixbuzz.com/docs/#!/Command/CreateGroups), [DeleteGroups](https://api.agilixbuzz.com/docs/#!/Command/DeleteGroups), [GetGroup](https://api.agilixbuzz.com/docs/#!/Command/GetGroup), [GetGroupEnrollmentList](https://api.agilixbuzz.com/docs/#!/Command/GetGroupEnrollmentList), [GetGroupList](https://api.agilixbuzz.com/docs/#!/Command/GetGroupList), [RemoveGroupMembers](https://api.agilixbuzz.com/docs/#!/Command/RemoveGroupMembers), [UpdateGroups](https://api.agilixbuzz.com/docs/#!/Command/UpdateGroups) | ❌ | ⏬ |
|
66
|
+
| Gradebook | [CalculateEnrollmentScenario](https://api.agilixbuzz.com/docs/#!/Command/CalculateEnrollmentScenario), [GetCalendar](https://api.agilixbuzz.com/docs/#!/Command/GetCalendar), [GetCalendarItems](https://api.agilixbuzz.com/docs/#!/Command/GetCalendarItems), [GetCalendarToken](https://api.agilixbuzz.com/docs/#!/Command/GetCalendarToken), [GetCertificates](https://api.agilixbuzz.com/docs/#!/Command/GetCertificates), [GetDueSoonList](https://api.agilixbuzz.com/docs/#!/Command/GetDueSoonList), [GetEntityGradebook2](https://api.agilixbuzz.com/docs/#!/Command/GetEntityGradebook2), [GetEntityGradebook3](https://api.agilixbuzz.com/docs/#!/Command/GetEntityGradebook3), [GetEntityGradebookSummary](https://api.agilixbuzz.com/docs/#!/Command/GetEntityGradebookSummary), [GetEntityWork2](https://api.agilixbuzz.com/docs/#!/Command/GetEntityWork2), [GetGrade](https://api.agilixbuzz.com/docs/#!/Command/GetGrade), [GetGradebookList](https://api.agilixbuzz.com/docs/#!/Command/GetGradebookList), [GetGradebookSummary](https://api.agilixbuzz.com/docs/#!/Command/GetGradebookSummary), [GetGradebookWeights](https://api.agilixbuzz.com/docs/#!/Command/GetGradebookWeights), [GetGradeHistory](https://api.agilixbuzz.com/docs/#!/Command/GetGradeHistory), [GetItemAnalysis2](https://api.agilixbuzz.com/docs/#!/Command/GetItemAnalysis2), [GetItemReport](https://api.agilixbuzz.com/docs/#!/Command/GetItemReport), [GetRubricMastery](https://api.agilixbuzz.com/docs/#!/Command/GetRubricMastery), [GetRubricStats](https://api.agilixbuzz.com/docs/#!/Command/GetRubricStats), [GetUserGradebook2](https://api.agilixbuzz.com/docs/#!/Command/GetUserGradebook2) | ❌ | 🔽 |
|
67
|
+
| Manifests and Items | [AssignItem](https://api.agilixbuzz.com/docs/#!/Command/AssignItem), [CopyItems](https://api.agilixbuzz.com/docs/#!/Command/CopyItems), [DeleteItems](https://api.agilixbuzz.com/docs/#!/Command/DeleteItems), [FindPersonalizedEntities](https://api.agilixbuzz.com/docs/#!/Command/FindPersonalizedEntities), [GetCourseContent](https://api.agilixbuzz.com/docs/#!/Command/GetCourseContent), [GetItem](https://api.agilixbuzz.com/docs/#!/Command/GetItem), [GetItemInfo](https://api.agilixbuzz.com/docs/#!/Command/GetItemInfo), [GetItemLinks](https://api.agilixbuzz.com/docs/#!/Command/GetItemLinks), [GetItemList](https://api.agilixbuzz.com/docs/#!/Command/GetItemList), [GetManifest](https://api.agilixbuzz.com/docs/#!/Command/GetManifest), [GetManifestData](https://api.agilixbuzz.com/docs/#!/Command/GetManifestData), [GetManifestInfo](https://api.agilixbuzz.com/docs/#!/Command/GetManifestInfo), [GetManifestItem](https://api.agilixbuzz.com/docs/#!/Command/GetManifestItem), [ListAssignableItems](https://api.agilixbuzz.com/docs/#!/Command/ListAssignableItems), [ListRestorableItems](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableItems), [NavigateItem](https://api.agilixbuzz.com/docs/#!/Command/NavigateItem), [PutItems](https://api.agilixbuzz.com/docs/#!/Command/PutItems), [RestoreItems](https://api.agilixbuzz.com/docs/#!/Command/RestoreItems), [Search2](https://api.agilixbuzz.com/docs/#!/Command/Search2), [UnassignItem](https://api.agilixbuzz.com/docs/#!/Command/UnassignItem), [UpdateManifestData](https://api.agilixbuzz.com/docs/#!/Command/UpdateManifestData) | ❌ | ⏺ |
|
68
|
+
| Objectives | [CreateObjectiveSets](https://api.agilixbuzz.com/docs/#!/Command/CreateObjectiveSets), [DeleteObjectiveMaps](https://api.agilixbuzz.com/docs/#!/Command/DeleteObjectiveMaps), [DeleteObjectives](https://api.agilixbuzz.com/docs/#!/Command/DeleteObjectives), [DeleteObjectiveSets](https://api.agilixbuzz.com/docs/#!/Command/DeleteObjectiveSets), [GetMasteryDetail](https://api.agilixbuzz.com/docs/#!/Command/GetMasteryDetail), [GetMasterySummary](https://api.agilixbuzz.com/docs/#!/Command/GetMasterySummary), [GetObjectiveList](https://api.agilixbuzz.com/docs/#!/Command/GetObjectiveList), [GetObjectiveMapList](https://api.agilixbuzz.com/docs/#!/Command/GetObjectiveMapList), [GetObjectiveMastery](https://api.agilixbuzz.com/docs/#!/Command/GetObjectiveMastery), [GetObjectiveSet2](https://api.agilixbuzz.com/docs/#!/Command/GetObjectiveSet2), [GetObjectiveSubjectList](https://api.agilixbuzz.com/docs/#!/Command/GetObjectiveSubjectList), [ListObjectiveSets](https://api.agilixbuzz.com/docs/#!/Command/ListObjectiveSets), [PutObjectiveMaps](https://api.agilixbuzz.com/docs/#!/Command/PutObjectiveMaps), [PutObjectives](https://api.agilixbuzz.com/docs/#!/Command/PutObjectives), [RestoreObjectiveSet](https://api.agilixbuzz.com/docs/#!/Command/RestoreObjectiveSet), [UpdateObjectiveSets](https://api.agilixbuzz.com/docs/#!/Command/UpdateObjectiveSets) | ❌ | ⏬ |
|
69
|
+
| Peer Grading | [GetPeerResponse](https://api.agilixbuzz.com/docs/#!/Command/GetPeerResponse), [GetPeerResponseInfo](https://api.agilixbuzz.com/docs/#!/Command/GetPeerResponseInfo), [GetPeerResponseList](https://api.agilixbuzz.com/docs/#!/Command/GetPeerResponseList), [GetPeerReviewList](https://api.agilixbuzz.com/docs/#!/Command/GetPeerReviewList), [PutPeerResponse](https://api.agilixbuzz.com/docs/#!/Command/PutPeerResponse) | ❌ | ⏬
|
70
|
+
| Ratings | [GetItemRating](https://api.agilixbuzz.com/docs/#!/Command/GetItemRating), [GetItemRatingSummary](https://api.agilixbuzz.com/docs/#!/Command/GetItemRatingSummary), [PutItemRating](https://api.agilixbuzz.com/docs/#!/Command/PutItemRating) | ❌ | ⏺ |
|
71
|
+
| Reports | [GetReportInfo](https://api.agilixbuzz.com/docs/#!/Command/GetReportInfo), [GetReportList](https://api.agilixbuzz.com/docs/#!/Command/GetReportList), [GetRunnableReportList](https://api.agilixbuzz.com/docs/#!/Command/GetRunnableReportList), [RunReport](https://api.agilixbuzz.com/docs/#!/Command/RunReport) | ❌ | ⏫ |
|
72
|
+
| Resources | [CopyResources](https://api.agilixbuzz.com/docs/#!/Command/CopyResources), [DeleteDocuments](https://api.agilixbuzz.com/docs/#!/Command/DeleteDocuments), [DeleteResources](https://api.agilixbuzz.com/docs/#!/Command/DeleteResources), [GetDocument](https://api.agilixbuzz.com/docs/#!/Command/GetDocument), [GetDocumentInfo](https://api.agilixbuzz.com/docs/#!/Command/GetDocumentInfo), [GetEntityResourceId](https://api.agilixbuzz.com/docs/#!/Command/GetEntityResourceId), [GetResource](https://api.agilixbuzz.com/docs/#!/Command/GetResource), [GetResourceInfo2](https://api.agilixbuzz.com/docs/#!/Command/GetResourceInfo2), [GetResourceList2](https://api.agilixbuzz.com/docs/#!/Command/GetResourceList2), [ListRestorableDocuments](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableDocuments), [ListRestorableResources](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableResources), [PutResource](https://api.agilixbuzz.com/docs/#!/Command/PutResource), [PutResourceFolders](https://api.agilixbuzz.com/docs/#!/Command/PutResourceFolders), [RestoreDocuments](https://api.agilixbuzz.com/docs/#!/Command/RestoreDocuments), [RestoreResources](https://api.agilixbuzz.com/docs/#!/Command/RestoreResources) | ❌ | ⏺ |
|
73
|
+
| Rights | [CreateRole](https://api.agilixbuzz.com/docs/#!/Command/CreateRole), [DeleteRole](https://api.agilixbuzz.com/docs/#!/Command/DeleteRole), [DeleteSubscriptions](https://api.agilixbuzz.com/docs/#!/Command/DeleteSubscriptions), [GetActorRights](https://api.agilixbuzz.com/docs/#!/Command/GetActorRights), [GetEffectiveRights](https://api.agilixbuzz.com/docs/#!/Command/GetEffectiveRights), [GetEffectiveSubscriptionList](https://api.agilixbuzz.com/docs/#!/Command/GetEffectiveSubscriptionList), [GetEntityRights](https://api.agilixbuzz.com/docs/#!/Command/GetEntityRights), [GetEntitySubscriptionList](https://api.agilixbuzz.com/docs/#!/Command/GetEntitySubscriptionList), [GetPersonas](https://api.agilixbuzz.com/docs/#!/Command/GetPersonas), [GetRights](https://api.agilixbuzz.com/docs/#!/Command/GetRights), [GetRightsList](https://api.agilixbuzz.com/docs/#!/Command/GetRightsList), [GetRole](https://api.agilixbuzz.com/docs/#!/Command/GetRole), [GetSubscriptionList](https://api.agilixbuzz.com/docs/#!/Command/GetSubscriptionList), [ListRoles](https://api.agilixbuzz.com/docs/#!/Command/ListRoles), [RestoreRole](https://api.agilixbuzz.com/docs/#!/Command/RestoreRole), [UpdateRights](https://api.agilixbuzz.com/docs/#!/Command/UpdateRights), [UpdateRole](https://api.agilixbuzz.com/docs/#!/Command/UpdateRole), [UpdateSubscriptions](https://api.agilixbuzz.com/docs/#!/Command/UpdateSubscriptions) | ❌ | 🔼 |
|
74
|
+
| Signals | [CreateSignal](https://api.agilixbuzz.com/docs/#!/Command/CreateSignal), [GetLastSignalId](https://api.agilixbuzz.com/docs/#!/Command/GetLastSignalId), [GetSignalList2](https://api.agilixbuzz.com/docs/#!/Command/GetSignalList2) | ❌ | 🔽 |
|
75
|
+
| Submissions | [DeleteWorkInProgress](https://api.agilixbuzz.com/docs/#!/Command/DeleteWorkInProgress), [GenerateSubmission](https://api.agilixbuzz.com/docs/#!/Command/GenerateSubmission), [GetScoData](https://api.agilixbuzz.com/docs/#!/Command/GetScoData), [GetStudentSubmission](https://api.agilixbuzz.com/docs/#!/Command/GetStudentSubmission), [GetStudentSubmissionHistory](https://api.agilixbuzz.com/docs/#!/Command/GetStudentSubmissionHistory), [GetStudentSubmissionInfo](https://api.agilixbuzz.com/docs/#!/Command/GetStudentSubmissionInfo), [GetTeacherResponse](https://api.agilixbuzz.com/docs/#!/Command/GetTeacherResponse), [GetTeacherResponseInfo](https://api.agilixbuzz.com/docs/#!/Command/GetTeacherResponseInfo), [GetWorkInProgress2](https://api.agilixbuzz.com/docs/#!/Command/GetWorkInProgress2), [PutItemActivity](https://api.agilixbuzz.com/docs/#!/Command/PutItemActivity), [PutScoData](https://api.agilixbuzz.com/docs/#!/Command/PutScoData), [PutStudentSubmission](https://api.agilixbuzz.com/docs/#!/Command/PutStudentSubmission), [PutTeacherResponse](https://api.agilixbuzz.com/docs/#!/Command/PutTeacherResponse), [PutTeacherResponses](https://api.agilixbuzz.com/docs/#!/Command/PutTeacherResponses), [PutWorkInProgress](https://api.agilixbuzz.com/docs/#!/Command/PutWorkInProgress), [SubmitWorkInProgress](https://api.agilixbuzz.com/docs/#!/Command/SubmitWorkInProgress) | ❌ | 🔽 |
|
76
|
+
| Users | [CreateUsers2](https://api.agilixbuzz.com/docs/#!/Command/CreateUsers2), [DeleteUsers](https://api.agilixbuzz.com/docs/#!/Command/DeleteUsers), [GetActiveUserCount](https://api.agilixbuzz.com/docs/#!/Command/GetActiveUserCount), [GetDomainActivity](https://api.agilixbuzz.com/docs/#!/Command/GetDomainActivity), [GetProfilePicture](https://api.agilixbuzz.com/docs/#!/Command/GetProfilePicture), [GetUser2](https://api.agilixbuzz.com/docs/#!/Command/GetUser2), [GetUserActivity](https://api.agilixbuzz.com/docs/#!/Command/GetUserActivity), [GetUserActivityStream](https://api.agilixbuzz.com/docs/#!/Command/GetUserActivityStream), [ListUsers](https://api.agilixbuzz.com/docs/#!/Command/ListUsers), [RestoreUser](https://api.agilixbuzz.com/docs/#!/Command/RestoreUser), [UpdateUsers](https://api.agilixbuzz.com/docs/#!/Command/UpdateUsers) | ❌ | ⏫ |
|
77
|
+
| Wikis | [CopyWikiPages](https://api.agilixbuzz.com/docs/#!/Command/CopyWikiPages), [DeleteWikiPages](https://api.agilixbuzz.com/docs/#!/Command/DeleteWikiPages), [GetWikiPage](https://api.agilixbuzz.com/docs/#!/Command/GetWikiPage), [GetWikiPageList](https://api.agilixbuzz.com/docs/#!/Command/GetWikiPageList), [ListRestorableWikiPages](https://api.agilixbuzz.com/docs/#!/Command/ListRestorableWikiPages), [PutWikiPage](https://api.agilixbuzz.com/docs/#!/Command/PutWikiPage), [RestoreWikiPages](https://api.agilixbuzz.com/docs/#!/Command/RestoreWikiPages), [UpdateWikiPageViewed](https://api.agilixbuzz.com/docs/#!/Command/UpdateWikiPageViewed) | ❌ | ⏬ |
|
78
|
+
| Example Name | Example Description | ✅ or ❌ | ⏫🔼⏺🔽⏬ |
|
79
|
+
|
80
|
+
## Development
|
81
|
+
|
82
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
83
|
+
|
84
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
85
|
+
|
86
|
+
## Contributing
|
87
|
+
|
88
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/beneggett/agilix. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
93
|
+
|
94
|
+
## Code of Conduct
|
95
|
+
|
96
|
+
Everyone interacting in the Agilix::Buzz project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/agilix/blob/master/CODE_OF_CONDUCT.md).
|
97
|
+
|
98
|
+
|
99
|
+
|
data/Rakefile
ADDED
data/agilix.gemspec
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "agilix/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "agilix"
|
7
|
+
spec.version = Agilix::VERSION
|
8
|
+
spec.authors = ["Ben Eggett"]
|
9
|
+
spec.email = ["beneggett@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Agilix Buzz API wrapper}
|
12
|
+
spec.description = %q{Fully implements Agilix Buzz API in Ruby}
|
13
|
+
spec.homepage = "https://github.com/beneggett/agilix"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
"public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
# Specify which files should be added to the gem when it is released.
|
27
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
29
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
|
+
end
|
31
|
+
spec.bindir = "exe"
|
32
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
|
+
spec.require_paths = ["lib"]
|
34
|
+
|
35
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
36
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
37
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
38
|
+
spec.add_development_dependency "vcr"
|
39
|
+
spec.add_development_dependency "webmock"
|
40
|
+
spec.add_development_dependency "pry"
|
41
|
+
# spec.add_development_dependency "guard"
|
42
|
+
# spec.add_development_dependency "guard-minitest"
|
43
|
+
spec.add_development_dependency "coveralls"
|
44
|
+
spec.add_development_dependency "simplecov"
|
45
|
+
spec.add_development_dependency "dotenv"
|
46
|
+
spec.add_dependency "httparty", ">= 0.14.0"
|
47
|
+
# spec.add_dependency "activesupport"
|
48
|
+
spec.add_dependency "builder"
|
49
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "dotenv"
|
3
|
+
Dotenv.load
|
4
|
+
require "bundler/setup"
|
5
|
+
require "agilix"
|
6
|
+
|
7
|
+
|
8
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
9
|
+
# with your gem easier. You can also use a different console, if you like.
|
10
|
+
|
11
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
12
|
+
require "pry"
|
13
|
+
Pry.start
|
14
|
+
|
15
|
+
# require "irb"
|
16
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/agilix.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
# require "active_support/all"
|
3
|
+
require "httparty"
|
4
|
+
require "ostruct"
|
5
|
+
|
6
|
+
require "agilix/buzz/commands/authentication"
|
7
|
+
require "agilix/buzz/commands/course"
|
8
|
+
require "agilix/buzz/commands/general"
|
9
|
+
require "agilix/buzz/api"
|
10
|
+
require "agilix/version"
|
11
|
+
|
12
|
+
|
13
|
+
module AgilixX
|
14
|
+
module Buzz
|
15
|
+
# Your code goes here...
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Agilix
|
2
|
+
module Buzz
|
3
|
+
class Api
|
4
|
+
URL_ENDPOINT = ENV.fetch("AGILIX_BUZZ_URL", "https://api.schooldigger.com")
|
5
|
+
URL_BASE = "#{URL_ENDPOINT}/cmd"
|
6
|
+
include HTTParty
|
7
|
+
|
8
|
+
include Agilix::Buzz::Commands::Authentication
|
9
|
+
include Agilix::Buzz::Commands::Course
|
10
|
+
include Agilix::Buzz::Commands::General
|
11
|
+
|
12
|
+
attr_accessor :username, :password, :domain, :token, :token_expiration
|
13
|
+
|
14
|
+
def initialize(options = {})
|
15
|
+
@username = options.fetch(:username, default_username)
|
16
|
+
@password = options.fetch(:password, default_password)
|
17
|
+
@domain = options.fetch(:domain, default_domain)
|
18
|
+
end
|
19
|
+
|
20
|
+
def authenticated_get(query = {})
|
21
|
+
check_authentication
|
22
|
+
get query
|
23
|
+
end
|
24
|
+
|
25
|
+
def authenticated_post(query = {})
|
26
|
+
check_authentication
|
27
|
+
post query
|
28
|
+
end
|
29
|
+
|
30
|
+
def get(query = {})
|
31
|
+
response = self.class.get(URL_BASE, query: modify_query(query), timeout: 30, headers: headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
def post(query = {})
|
35
|
+
response = self.class.post(URL_BASE, body: modify_body(query), timeout: 30, headers: headers)
|
36
|
+
end
|
37
|
+
|
38
|
+
def check_authentication
|
39
|
+
if token && token_expiration
|
40
|
+
if token_expiration < Time.now
|
41
|
+
extend_session
|
42
|
+
end
|
43
|
+
else
|
44
|
+
response = login username: @username, password: @password, domain: @domain
|
45
|
+
@token = response.dig("response", "user", "token")
|
46
|
+
@token_expiration = Time.now + (response.dig("response", "user", "authenticationexpirationminutes").to_i * 60 )
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def modify_query(query = {})
|
53
|
+
default_params = {}
|
54
|
+
default_params.merge! query
|
55
|
+
default_params["_token"] = token if token
|
56
|
+
default_params
|
57
|
+
end
|
58
|
+
|
59
|
+
def modify_body(body = {})
|
60
|
+
default_params = { request: {}.merge(body) }
|
61
|
+
default_params[:request]["_token"] = token if token
|
62
|
+
default_params.to_json
|
63
|
+
end
|
64
|
+
|
65
|
+
def headers
|
66
|
+
{
|
67
|
+
"Accept" => "application/json",
|
68
|
+
"Content-Type" => "application/json",
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
def default_username
|
73
|
+
ENV["AGILIX_BUZZ_USERNAME"]
|
74
|
+
end
|
75
|
+
|
76
|
+
def default_password
|
77
|
+
ENV["AGILIX_BUZZ_PASSWORD"]
|
78
|
+
end
|
79
|
+
|
80
|
+
def default_domain
|
81
|
+
ENV["AGILIX_BUZZ_DEFAULT_DOMAIN"]
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Agilix
|
2
|
+
module Buzz
|
3
|
+
module Commands
|
4
|
+
module Authentication
|
5
|
+
|
6
|
+
|
7
|
+
def login_2(username: , password: , domain: )
|
8
|
+
post cmd: "login2", username: "#{domain}/#{username}", password: password
|
9
|
+
end
|
10
|
+
alias_method :login, :login_2
|
11
|
+
|
12
|
+
def extend_session
|
13
|
+
response = authenticated_post cmd: "extendsession"
|
14
|
+
@token_expiration = Time.now + (response.dig("response", "session", "authenticationexpirationminutes").to_i * 60 )
|
15
|
+
response
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Agilix
|
2
|
+
module Buzz
|
3
|
+
module Commands
|
4
|
+
module Course
|
5
|
+
|
6
|
+
# api = Agilix::Buzz::Api::new
|
7
|
+
# api.list_courses
|
8
|
+
# api.list_courses domainid: 5
|
9
|
+
def list_courses(options = {})
|
10
|
+
authenticated_get cmd: "listcourses", domainid: options.fetch(:domainid, 0)
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: agilix
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ben Eggett
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: dotenv
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: httparty
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.14.0
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.14.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: builder
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Fully implements Agilix Buzz API in Ruby
|
168
|
+
email:
|
169
|
+
- beneggett@gmail.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".coveralls.yml"
|
175
|
+
- ".env.sample"
|
176
|
+
- ".gitignore"
|
177
|
+
- ".travis.yml"
|
178
|
+
- CODE_OF_CONDUCT.md
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE.txt
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- agilix.gemspec
|
184
|
+
- bin/console
|
185
|
+
- bin/setup
|
186
|
+
- lib/agilix.rb
|
187
|
+
- lib/agilix/buzz/api.rb
|
188
|
+
- lib/agilix/buzz/commands/authentication.rb
|
189
|
+
- lib/agilix/buzz/commands/course.rb
|
190
|
+
- lib/agilix/buzz/commands/general.rb
|
191
|
+
- lib/agilix/version.rb
|
192
|
+
homepage: https://github.com/beneggett/agilix
|
193
|
+
licenses:
|
194
|
+
- MIT
|
195
|
+
metadata:
|
196
|
+
allowed_push_host: https://rubygems.org
|
197
|
+
post_install_message:
|
198
|
+
rdoc_options: []
|
199
|
+
require_paths:
|
200
|
+
- lib
|
201
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
requirements: []
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 2.7.8
|
214
|
+
signing_key:
|
215
|
+
specification_version: 4
|
216
|
+
summary: Agilix Buzz API wrapper
|
217
|
+
test_files: []
|