Class Tokens
Inheritance
System.Object
Tokens
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CommonBotLibrary
Assembly: cs.temp.dll.dll
Syntax
public class Tokens
Properties
Github
Contains Github repository and authentication credentials.
Declaration
public static Tokens.GithubCredentials Github { get; set; }
Property Value
Type | Description |
---|---|
Tokens.GithubCredentials |
Contains Google Cloud Platform API key and Custom Search Engine ID.
Declaration
public static Tokens.GoogleCredentials Google { get; set; }
Property Value
Type | Description |
---|---|
Tokens.GoogleCredentials |
Imgur
Imgur client ID.
Declaration
public static string Imgur { set; }
Property Value
Type | Description |
---|---|
System.String |
MyAnimeList
Contains MyAnimeList account username and password.
Declaration
public static Tokens.BasicAuthCredentials MyAnimeList { get; set; }
Property Value
Type | Description |
---|---|
Tokens.BasicAuthCredentials |
Omdb
OMDb API key.
Declaration
public static string Omdb { set; }
Property Value
Type | Description |
---|---|
System.String |
OpenWeatherMap
OpenWeatherMap API key.
Declaration
public static string OpenWeatherMap { set; }
Property Value
Type | Description |
---|---|
System.String |
Pandorabot
Pandorabots bot ID.
Declaration
public static string Pandorabot { set; }
Property Value
Type | Description |
---|---|
System.String |
Contains Twitter developer credentials. See TweetInvi for docs.
Declaration
public static Tokens.TwitterCredentials Twitter { get; set; }
Property Value
Type | Description |
---|---|
Tokens.TwitterCredentials |
Watson
Contains Watson account username and password.
Declaration
public static Tokens.BasicAuthCredentials Watson { get; set; }
Property Value
Type | Description |
---|---|
Tokens.BasicAuthCredentials |
Yandex
Yandex Translate API key.
Declaration
public static string Yandex { set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
LoadAsync(String)
Initializes all static references to third-party API keys.
Declaration
public static Task LoadAsync(string keysPath = "../../tokens.json")
Parameters
Type | Name | Description |
---|---|---|
System.String | keysPath | The path to a tokens.json file. |
Returns
Type | Description |
---|---|
Task |
LoadAsync<T>(String)
Initializes all static references to third-party API keys into the provided type T. Use this if you have a class with additional static API keys that subclasses Tokens.
Declaration
public static Task LoadAsync<T>(string keysPath = "../../tokens.json")where T : Tokens
Parameters
Type | Name | Description |
---|---|---|
System.String | keysPath | The path to a tokens.json file. |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
T | The class to deserialize into. |