generated from NdoleStudio/go-http-client
-
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.
- Loading branch information
1 parent
d66dc10
commit 2f7ad96
Showing
21 changed files
with
771 additions
and
227 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 |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
$path | ||
.idea | ||
.idea | ||
cmd |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ynote | ||
|
||
// AccessTokenResponse is the response when fetching the access token | ||
type AccessTokenResponse struct { | ||
AccessToken string `json:"access_token"` | ||
Scope string `json:"scope"` | ||
TokenType string `json:"token_type"` | ||
ExpiresIn int64 `json:"expires_in"` | ||
} |
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
package client | ||
package ynote | ||
|
||
import "net/http" | ||
|
||
type clientConfig struct { | ||
httpClient *http.Client | ||
delay int | ||
baseURL string | ||
httpClient *http.Client | ||
customerKey string | ||
customerSecret string | ||
username string | ||
password string | ||
tokenURL string | ||
apiURL string | ||
} | ||
|
||
func defaultClientConfig() *clientConfig { | ||
return &clientConfig{ | ||
httpClient: http.DefaultClient, | ||
delay: 0, | ||
baseURL: "https://httpstat.us", | ||
tokenURL: "https://omapi-token.ynote.africa", | ||
apiURL: "https://omapi.ynote.africa", | ||
} | ||
} |
Oops, something went wrong.