PdgaApi
PDGA API Wrapper
Installation
Add this line to your application's Gemfile:
gem 'pdga_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install pdga_api
Starting steps
In order to use this you will need to initialize using your pdga username and password
Usage
Expected responses can all be found here https://www.pdga.com/dev/api/rest/v1/auth
There are 4 types of actions that this gem allows you to perform.
- Authentication
- Initialize
@client = Pdga.new(username: "username goes here", password: "password goes here")
- connection status
@client.connect
- logout
@client.logout
- Initialize
- Player information which takes a hash of various search params that are listed on the PDGA site (default 10 returned with a max of 200)
- player search
@client.players({ pdga_number: "15857" })
- player statistics search
@client.player_statistics({ pdga_number: "15857", year: "2022" })
- player search
- Event information which takes a hash of various search params that are listed on the PDGA site (default 10 returned with a max of 200)
- event search
@client.events({ tournament_id: "47877" })
- event search
- Course information which takes a hash of various search params that are listed on the PDGA site (default 10 returned with a max of 200)
- course search
@client.courses({ course_id: "2146" })
- course search
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the PdgaApi project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Todos
- Mock the tests!
- Make readme pretty and thorough