challonge-rs
Client library for the Challonge REST API.
Usage
- Log in to Challonge with
Challonge::new
. - Call API methods to interact with the service.
Documentation
Examples
See the examples
directory in the source tree.
Category: Rust / Game development |
Watchers: 2 |
Star: 2 |
Fork: 5 |
Last update: Mar 17, 2023 |
Client library for the Challonge REST API.
Challonge::new
.See the examples
directory in the source tree.
Borrowing structs instead of requiring the user to clone them is better because it's more ergonomical for them to not need to clone it and instead simply reference it, and instead of requiring all fields to be cloned, only a few will need to be. I can look into some implementation details later for 0 clones.
By caching the ~/.cargo directory and not cargo bench no-run'ing for currently no necessary reason on nightly, the build time should drastically reduce after the initial build to cache.
My metrics:
Elapsed time 1 min 50 sec
Total time 3 min 38 sec
The .travis.yml
file now has consistent indentation.
sudo: false
in the .travis.yml
file will allow this caching.
By mapping the values on a serde Value::Array, cloning each element in the array will no longer be necessary. This was due to the lifetime of each element not living long enough in a regular if-let-loop-if-let, pushing to a Vec.
Additionally, add a utility module for common functions. Rather than duplicating the into_map
and remove
function across each mod, they can be put into a common utilities module.
This PR's scope is rather large, and could be separated out if you want. The second commit would depend on the first commit being merged if you want them in separate PRs.
Explicitly specify what type we're deserialising in create_participant_bulk
to protect against _
being inferred as having type !
. See here for more info.
serde
crate.reqwest
crate.At this moment it needs Vec<u8>
. To provide more usability it is better to make some helper-method which takes a file path or web link to avoid reading data manually.
Some fields of structures are not implelemented due to the lack of information on the api.challonge.com
web-site or due to the lack of time :)
Tournament:
// category: ??,
// <signup-cap nil="true"/>
// <start-at nil="true"/>
// <started-checking-in-at nil="true"/>
// <state>underway</state>
// <tie-breaks type="array">
// <tie-break>match wins vs tied</tie-break>
// <tie-break>game wins</tie-break>
// <tie-break>points scored</tie-break>
// </tie-breaks>
// <subdomain nil="true"/>
// <sign-up-url nil="true"/>
Match:
// attachment_count: ,
// group_id: ,
// location:
// scheduled_time:
// underway_at: