-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from seart-group/enhancement/tokens
- Loading branch information
Showing
9 changed files
with
138 additions
and
32 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
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
25 changes: 25 additions & 0 deletions
25
src/main/java/ch/usi/si/seart/github/GitHubHttpHeaders.java
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package ch.usi.si.seart.github; | ||
|
||
import lombok.experimental.UtilityClass; | ||
|
||
@UtilityClass | ||
public final class GitHubHttpHeaders { | ||
|
||
public static final String X_GITHUB_REQUEST_ID = "X-GitHub-Request-Id"; | ||
|
||
public static final String X_GITHUB_API_VERSION = "X-GitHub-Api-Version"; | ||
|
||
public static final String X_OAUTH_SCOPES = "X-OAuth-Scopes"; | ||
|
||
public static final String X_ACCEPTED_OAUTH_SCOPES = "X-Accepted-OAuth-Scopes"; | ||
|
||
public static final String X_RATELIMIT_LIMIT = "X-RateLimit-Limit"; | ||
|
||
public static final String X_RATELIMIT_REMAINING = "X-RateLimit-Remaining"; | ||
|
||
public static final String X_RATELIMIT_RESET = "X-RateLimit-Reset"; | ||
|
||
public static final String X_RATELIMIT_USED = "X-RateLimit-Used"; | ||
|
||
public static final String X_RATELIMIT_RESOURCE = "X-RateLimit-Resource"; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/ch/usi/si/seart/github/GitHubMediaTypes.java
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ch.usi.si.seart.github; | ||
|
||
import lombok.experimental.UtilityClass; | ||
import org.springframework.http.MediaType; | ||
|
||
@UtilityClass | ||
public class GitHubMediaTypes { | ||
|
||
public static final MediaType APPLICATION_VND_GITHUB_V3_JSON; | ||
|
||
public static final String APPLICATION_VND_GITHUB_V3_JSON_VALUE; | ||
|
||
static { | ||
String type = "application"; | ||
String subtype = "vnd.github.v3+json"; | ||
APPLICATION_VND_GITHUB_V3_JSON = new MediaType(type, subtype); | ||
APPLICATION_VND_GITHUB_V3_JSON_VALUE = type + "/" + subtype; | ||
} | ||
} |
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