示例#1
0
文件: Apachai.cs 项目: garuma/apachai
 static Apachai()
 {
     c = new ConfigManager ("config.json");
     store = new BackingStore (c);
     oauthConfig = new OAuthConfig (c.GetOrThrow<string> ("twitterKey"),
                                    c.GetOrThrow<string> ("twitterSecret"),
                                    c.GetOrThrow<string> ("twitterCallback"));
     oauth = new OAuth (oauthConfig);
     testInstance = c.GetOrDefault<bool> ("testInstance", false);
     baseServerUrl = c.GetOrThrow<string> ("serverBaseUrl");
     imgDirectory = c.GetOrDefault<string> ("imagesDirectory", "Pictures");
     UrlShortener.Store = store;
 }
示例#2
0
 public Twitter(OAuth oauth)
 {
     this.oauth = oauth;
 }