public void Can_hit_endpoint() { ReleaseTags tags = Api <ReleaseTags> .Get .WithParameter("releaseid", "155408") .Please(); Assert.That(tags, Is.Not.Null); Assert.That(tags.TagList.Count, Is.GreaterThan(0)); Assert.That(tags.TagList.FirstOrDefault().Id, Is.Not.Empty); Assert.That(tags.TagList.Where(x => x.Id == "rock").FirstOrDefault().Text, Is.EqualTo("rock")); }
public void Can_hit_endpoint_with_paging() { ReleaseTags artistBrowse = Api <ReleaseTags> .Get .WithParameter("releaseid", "155408") .WithParameter("page", "2") .WithParameter("pageSize", "1") .Please(); Assert.That(artistBrowse, Is.Not.Null); Assert.That(artistBrowse.Page, Is.EqualTo(2)); Assert.That(artistBrowse.PageSize, Is.EqualTo(1)); }
public async void Can_hit_endpoint_with_paging() { var request = Api <ReleaseTags> .Create .WithParameter("releaseid", "155408") .WithParameter("page", "2") .WithParameter("pageSize", "1"); ReleaseTags releaseTags = await request.Please(); Assert.That(releaseTags, Is.Not.Null); Assert.That(releaseTags.Page, Is.EqualTo(2)); Assert.That(releaseTags.PageSize, Is.EqualTo(1)); }
private async void releases_releaseTagsButton_Click(object sender, EventArgs e) { ReleaseTags api = new ReleaseTags { ApiKey = apiKey }; api.Arguments.release_id = 86; if (fredValidationButton.Checked) { api.Arguments.Validators.Clear(); } TagContainer container = syncButton.Checked ? api.Fetch() : await api.FetchAsync(); ShowResults(api); }