-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring, add sematic logger, add more endpoints
- Loading branch information
Showing
15 changed files
with
111 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,15 +32,22 @@ password = 'your_password_here' | |
|
||
client = School21::Client.configure do |config| | ||
config.credentials = { login: login, password: password } | ||
config.enable_logging = true # false by default | ||
|
||
# If you want to log client's requests and responses (turned off by default) | ||
config.enable_logging = true | ||
end | ||
|
||
# Request access token from the API server. | ||
# Access token is stored inside client object and reused for API requests. | ||
# If access token is expired client will automatically request a new one. | ||
client.authenticate! | ||
``` | ||
|
||
- Select the domain specific API that you want to use. This API has all endpoints related to that domain. Here's an example of `Participant API` and a call to `/participants/:login` | ||
|
||
```ruby | ||
participants_api = client.participants_api | ||
response = participants_api.participants('[email protected]') | ||
response = participants_api.participant('peer_nickname') | ||
|
||
if response.success? | ||
puts response.data | ||
|
@@ -57,4 +64,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To | |
|
||
## Contributing | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/ikael21/school21_api_sdk. | ||
Bug reports and pull requests are welcome on GitHub at <https://github.com/ikael21/school21_api_sdk>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.