1
1
[ ![ license] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg )] ( https://opensource.org/licenses/Apache-2.0 )
2
2
[ ![ docs] ( https://docs.rs/roctogen/badge.svg )] ( https://docs.rs/roctogen/ )
3
+ [ ![ GitHub workflow] ( https://github.com/github/docs/actions/workflows/default.yml/badge.svg )] ( https://github.com/fussybeaver/roctogen/actions/workflows/default.yml )
3
4
4
5
## Roctogen: a rust client library for the GitHub v3 API
5
6
@@ -21,6 +22,44 @@ roctogen = "0.1.0"
21
22
22
23
[ API docs] ( https://docs.rs/roctogen/latest ) .
23
24
25
+ [ Endpoints] ( https://docs.rs/roctogen/latest/roctogen/endpoints/index.html ) .
26
+
27
+ Supported endpoints:
28
+ ---
29
+
30
+ - [ Meta] ( https://docs.rs/roctogen/latest/roctogen/endpoints/meta/struct.Meta.html )
31
+ - [ Issues] ( https://docs.rs/roctogen/latest/roctogen/endpoints/issues/struct.Issues.html )
32
+ - [ Licenses] ( https://docs.rs/roctogen/latest/roctogen/endpoints/licenses/struct.Licenses.html )
33
+ - [ Reactions] ( https://docs.rs/roctogen/latest/roctogen/endpoints/reactions/struct.Reactions.html )
34
+ - [ Activity] ( https://docs.rs/roctogen/latest/roctogen/endpoints/activity/struct.Activity.html )
35
+ - [ Projects] ( https://docs.rs/roctogen/latest/roctogen/endpoints/projects/struct.Projects.html )
36
+ - [ Orgs] ( https://docs.rs/roctogen/latest/roctogen/endpoints/orgs/struct.Orgs.html )
37
+ - [ Users] ( https://docs.rs/roctogen/latest/roctogen/endpoints/users/struct.Users.html )
38
+ - [ Apps] ( https://docs.rs/roctogen/latest/roctogen/endpoints/apps/struct.Apps.html )
39
+ - [ AuditLog] ( https://docs.rs/roctogen/latest/roctogen/endpoints/audit_log/struct.AuditLog.html )
40
+ - [ RateLimit] ( https://docs.rs/roctogen/latest/roctogen/endpoints/rate_limit/struct.RateLimit.html )
41
+ - [ Repos] ( https://docs.rs/roctogen/latest/roctogen/endpoints/repos/struct.Repos.html )
42
+ - [ SecretScanning] ( https://docs.rs/roctogen/latest/roctogen/endpoints/secret_scanning/struct.SecretScanning.html )
43
+ - [ Packages] ( https://docs.rs/roctogen/latest/roctogen/endpoints/packages/struct.Packages.html )
44
+ - [ Search] ( https://docs.rs/roctogen/latest/roctogen/endpoints/search/struct.Search.html )
45
+ - [ Teams] ( https://docs.rs/roctogen/latest/roctogen/endpoints/teams/struct.Teams.html )
46
+ - [ Markdown] ( https://docs.rs/roctogen/latest/roctogen/endpoints/markdown/struct.Markdown.html )
47
+ - [ OauthAuthorizations] ( https://docs.rs/roctogen/latest/roctogen/endpoints/oauth_authorizations/struct.OauthAuthorizations.html )
48
+ - [ Actions] ( https://docs.rs/roctogen/latest/roctogen/endpoints/actions/struct.Actions.html )
49
+ - [ Migrations] ( https://docs.rs/roctogen/latest/roctogen/endpoints/migrations/struct.Migrations.html )
50
+ - [ Gists] ( https://docs.rs/roctogen/latest/roctogen/endpoints/gists/struct.Gists.html )
51
+ - [ CodesOfConduct] ( https://docs.rs/roctogen/latest/roctogen/endpoints/codes_of_conduct/struct.CodesOfConduct.html )
52
+ - [ Pulls] ( https://docs.rs/roctogen/latest/roctogen/endpoints/pulls/struct.Pulls.html )
53
+ - [ Gitignore] ( https://docs.rs/roctogen/latest/roctogen/endpoints/gitignore/struct.Gitignore.html )
54
+ - [ EnterpriseAdmin] ( https://docs.rs/roctogen/latest/roctogen/endpoints/enterprise_admin/struct.EnterpriseAdmin.html )
55
+ - [ Git] ( https://docs.rs/roctogen/latest/roctogen/endpoints/git/struct.Git.html )
56
+ - [ Scim] ( https://docs.rs/roctogen/latest/roctogen/endpoints/scim/struct.Scim.html )
57
+ - [ CodeScanning] ( https://docs.rs/roctogen/latest/roctogen/endpoints/code_scanning/struct.CodeScanning.html )
58
+ - [ Checks] ( https://docs.rs/roctogen/latest/roctogen/endpoints/checks/struct.Checks.html )
59
+ - [ Billing] ( https://docs.rs/roctogen/latest/roctogen/endpoints/billing/struct.Billing.html )
60
+ - [ Interactions] ( https://docs.rs/roctogen/latest/roctogen/endpoints/interactions/struct.Interactions.html )
61
+ - [ Emojis] ( https://docs.rs/roctogen/latest/roctogen/endpoints/emojis/struct.Emojis.html )
62
+
24
63
## Usage
25
64
26
65
A quick example of this library:
@@ -97,7 +136,7 @@ $ mvn -D org.slf4j.simpleLogger.defaultLogLevel=info clean compiler:compile gene
97
136
98
137
## Tests
99
138
100
- Beware, tests are currently still doing real HTTP requests to the GitHub API.
139
+ Beware, tests that are not run with the ` mock ` feature are currently still doing real HTTP requests to the GitHub API.
101
140
102
141
Run the wasm tests:
103
142
@@ -111,4 +150,21 @@ Run the sync tests:
111
150
$ cargo test --features isahc,mercy,squirrel-girl,inertia,starfox --target x86_64-unknown-linux-gnu -- --nocapture
112
151
```
113
152
153
+ In order to avoid GitHub's API rate limiting, you can run the non-wasm tests using wiremock.
154
+ You'll need to start wiremock in the background:
155
+
156
+ ``` nocompile
157
+ $ docker run -d --name wiremock -p 8080:8080 -v $PWD/tests/stubs:/home/wiremock
158
+ rodolpheche/wiremock
159
+ ```
160
+
161
+ #### Regenerate the wiremock stubs
162
+
163
+ You should regenerate the stubs if the remote API has changed:
164
+
165
+ ``` nocompile
166
+ $ docker run -d --name wiremock -p 8080:8080 -v $PWD/tests/stubs:/home/wiremock -u (id -u):(id -g) rodolpheche/wiremock --verbose --proxy-all="https://api.github.com" --record-mappings
167
+ ```
168
+
169
+
114
170
License: Apache-2.0
0 commit comments