本文整理汇总了C#中Imgur.API.Endpoints.Impl.AccountEndpoint类的典型用法代码示例。如果您正苦于以下问题:C# AccountEndpoint类的具体用法?C# AccountEndpoint怎么用?C# AccountEndpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccountEndpoint类属于Imgur.API.Endpoints.Impl命名空间,在下文中一共展示了AccountEndpoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendVerificationEmailAsync_IsTrue
public async Task SendVerificationEmailAsync_IsTrue()
{
var client = new MashapeClient(ClientId, ClientSecret, MashapeKey, OAuth2Token);
var endpoint = new AccountEndpoint(client);
await endpoint.SendVerificationEmailAsync();
}
示例2: ImgurClient
public async Task GetAccountGalleryFavoritesAsync_WithDefaultUsernameAndOAuth2Null_ThrowsArgumentNullException
()
{
var client = new ImgurClient("123", "1234");
var endpoint = new AccountEndpoint(client);
await endpoint.GetAccountGalleryFavoritesAsync();
}
示例3: DeleteAlbumAsync_WithUsernameNull_ThrowsArgumentNullException
public async Task DeleteAlbumAsync_WithUsernameNull_ThrowsArgumentNullException()
{
var fakeOAuth2TokenHandler = new FakeOAuth2TokenHandler();
var client = new ImgurClient("123", "1234", fakeOAuth2TokenHandler.GetOAuth2TokenCodeResponse());
var endpoint = new AccountEndpoint(client);
await endpoint.DeleteAlbumAsync("yMgB7", null);
}
示例4: VerifyEmailAsync_IsTrue
public async Task VerifyEmailAsync_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret, await GetOAuth2Token());
var endpoint = new AccountEndpoint(client);
var verified = await endpoint.VerifyEmailAsync();
Assert.IsTrue(verified);
}
示例5: GetGalleryProfileAsync_WithDefaultUsername_AnyTrophies_IsFalse
public async Task GetGalleryProfileAsync_WithDefaultUsername_AnyTrophies_IsFalse()
{
var client = new ImgurClient(ClientId, ClientSecret, await GetOAuth2Token());
var endpoint = new AccountEndpoint(client);
var profile = await endpoint.GetGalleryProfileAsync();
Assert.IsFalse(profile.Trophies.Any());
}
示例6: GetAccountSettingsAsync_IsTrue
public async Task GetAccountSettingsAsync_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret, await GetOAuth2Token());
var endpoint = new AccountEndpoint(client);
var settings = await endpoint.GetAccountSettingsAsync();
Assert.IsFalse(settings.PublicImages);
}
示例7: GetAccountFavoritesAsync_Any_IsTrue
public async Task GetAccountFavoritesAsync_Any_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret, await GetOAuth2Token());
var endpoint = new AccountEndpoint(client);
var favourites = await endpoint.GetAccountFavoritesAsync();
Assert.IsTrue(favourites.Any());
}
示例8: GetImageAsync_IsNotNull
public async Task GetImageAsync_IsNotNull()
{
var client = new MashapeClient(ClientId, ClientSecret, MashapeKey);
var endpoint = new AccountEndpoint(client);
var image = await endpoint.GetImageAsync("ra06GZN", "sarah");
Assert.IsNotNull(image);
}
示例9: GetAlbumsAsync_AreEqual
public async Task GetAlbumsAsync_AreEqual()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var albums = await endpoint.GetAlbumsAsync("sarah");
Assert.AreEqual(50, albums.Count());
}
示例10: GetAccountAsync_WithDefaultUsername_AreEqual
public async Task GetAccountAsync_WithDefaultUsername_AreEqual()
{
var client = new MashapeClient(ClientId, ClientSecret, MashapeKey, OAuth2Token);
var endpoint = new AccountEndpoint(client);
var account = await endpoint.GetAccountAsync();
Assert.IsTrue(account.Url.Equals("ImgurAPIDotNet", StringComparison.OrdinalIgnoreCase));
}
示例11: GetGalleryProfileAsync_AnyTrophies_IsTrue
public async Task GetGalleryProfileAsync_AnyTrophies_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var profile = await endpoint.GetGalleryProfileAsync("sarah");
Assert.IsTrue(profile.Trophies.Any());
}
示例12: GetAccountSubmissionsAsync_Any_IsTrue
public async Task GetAccountSubmissionsAsync_Any_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var submissions = await endpoint.GetAccountSubmissionsAsync("sarah");
Assert.IsTrue(submissions.Any());
}
示例13: GetAccountGalleryFavoritesAsync_Any_IsTrue
public async Task GetAccountGalleryFavoritesAsync_Any_IsTrue()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var favourites = await endpoint.GetAccountGalleryFavoritesAsync("sarah");
Assert.IsTrue(favourites.Any());
}
示例14: GetAccountAsync_WithUsername_AreEqual
public async Task GetAccountAsync_WithUsername_AreEqual()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var account = await endpoint.GetAccountAsync("sarah");
Assert.AreEqual("sarah", account.Url.ToLower());
}
示例15: VerifyEmailAsync_IsTrue
public async Task VerifyEmailAsync_IsTrue()
{
var client = new MashapeClient(ClientId, ClientSecret, MashapeKey, OAuth2Token);
var endpoint = new AccountEndpoint(client);
var verified = await endpoint.VerifyEmailAsync();
Assert.IsTrue(verified);
}