本文整理汇总了C#中Imgur.API.Endpoints.Impl.AccountEndpoint类的典型用法代码示例。如果您正苦于以下问题:C# AccountEndpoint类的具体用法?C# AccountEndpoint怎么用?C# AccountEndpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccountEndpoint类属于Imgur.API.Endpoints.Impl命名空间,在下文中一共展示了AccountEndpoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:7,代码来源:MashapeClientWithOAuth2Tests.cs
示例2: ImgurClient
public async Task GetAccountGalleryFavoritesAsync_WithDefaultUsernameAndOAuth2Null_ThrowsArgumentNullException
()
{
var client = new ImgurClient("123", "1234");
var endpoint = new AccountEndpoint(client);
await endpoint.GetAccountGalleryFavoritesAsync();
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:7,代码来源:AccountEndpointTests.Gallery.cs
示例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);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:7,代码来源:AccountEndpointTests.Albums.cs
示例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);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthWithOAuth2Tests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthWithOAuth2Tests.cs
示例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);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthWithOAuth2Tests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthWithOAuth2Tests.cs
示例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);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:MashapeClientTests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:ImgurClientTests.cs
示例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));
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:MashapeClientWithOAuth2Tests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthTests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthTests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthTests.cs
示例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());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthTests.cs
示例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);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:MashapeClientWithOAuth2Tests.cs
示例16: GetAlbumCountAsync_GreaterThan100
public async Task GetAlbumCountAsync_GreaterThan100()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var albums = await endpoint.GetAlbumCountAsync("sarah");
Assert.IsTrue(albums > 100);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:ImgurClientTests.cs
示例17: GetAccountAsync_WithDefaultUsername_AreEqual
public async Task GetAccountAsync_WithDefaultUsername_AreEqual()
{
var client = new ImgurClient(ClientId, ClientSecret, await GetOAuth2Token());
var endpoint = new AccountEndpoint(client);
var account = await endpoint.GetAccountAsync();
Assert.AreEqual("ImgurAPIDotNet".ToLower(), account.Url.ToLower());
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:AccountEndpointImgurAuthWithOAuth2Tests.cs
示例18: DeleteImageAsync_ThrowsImgurException
public async Task DeleteImageAsync_ThrowsImgurException()
{
var client = new MashapeClient(ClientId, ClientSecret, MashapeKey);
var endpoint = new AccountEndpoint(client);
var deleted = await endpoint.DeleteImageAsync("ra06GZN", "sarah");
Assert.IsTrue(deleted);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:MashapeClientTests.cs
示例19: GetAlbumAsync_IsNotNull
public async Task GetAlbumAsync_IsNotNull()
{
var client = new ImgurClient(ClientId, ClientSecret);
var endpoint = new AccountEndpoint(client);
var album = await endpoint.GetAlbumAsync("SbU9Y", "sarah");
Assert.IsNotNull(album);
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:ImgurClientTests.cs
示例20: 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.IsTrue("sarah".Equals(account.Url, StringComparison.OrdinalIgnoreCase));
}
开发者ID:Ranlaorn,项目名称:Imgur.API,代码行数:9,代码来源:ImgurClientTests.cs
注:本文中的Imgur.API.Endpoints.Impl.AccountEndpoint类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论