stopping for now

This commit is contained in:
Tommy Parnell
2015-04-08 13:07:51 -04:00
parent a445c7d2ff
commit 699f0c3467
21 changed files with 4410 additions and 1300 deletions

View File

@@ -1 +1,23 @@
# Untappd.Net
This is a c# wrapper around the Untappd API.
## Coverage
So far only the Requests that do not require user tokens have been implemented
## How do I use?
* Request an [API Key](http://untappd.com/api/register)
* You should be able to make a repository and call the get method with the thing you are requesting.
Note: Additional parameters can be passed into the Get Method with an IDictionary.
```csharp
var ts = new UnAuthenticatedUntappdCredentials("key", "secret");
var t = new Repository().Get<UserDistinctBeers>(ts, "tparnell");
```

View File

@@ -1,11 +1,8 @@
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
using NUnit.Framework;
using Untappd.Client.Net;
using Untappd.Net.Responses.UserInfo;
using Untappd.Net.Request;
using Untappd.Net.Responses.UserDistinctBeer;
namespace Untappd.Net.UnitTests
{
@@ -13,11 +10,12 @@ namespace Untappd.Net.UnitTests
public class Class1
{
[Test]
[Ignore]
public void Test()
{
//var t = new Request.Request().Get<UnAuthenticatedUntappdCredentials, UserInfoRootobject>(ts, "tparnell");
//Console.WriteLine(t.response.user.first_name);
var ts = new UnAuthenticatedUntappdCredentials("clientid", "clientkey");
var t = new Repository().Get<UserDistinctBeers>(ts, "tparnell");
Console.WriteLine(t);
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Untappd.Net.Client
{
public interface IAuthenticatedUntappdCredentials : IUntappdCredentials
{
string AccessToken { get; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Untappd.Net
{
public struct Constants
{
public const string BaseRequestString = "https://api.untappd.com";
}
}

View File

@@ -6,8 +6,17 @@ using System.Threading.Tasks;
namespace Untappd.Net.Request
{
public abstract class AuthenticatedRequest : BaseRequest
public abstract class AuthenticatedRequest
{
protected override abstract string _EndPoint { get; }
protected abstract string _EndPoint { get; }
/// <summary>
/// Pass in the parameter into the request...ie username, brewery, etc.
/// </summary>
/// <param name="parameter"></param>
/// <returns></returns>
internal string EndPoint(string parameter)
{
return string.Format(_EndPoint, parameter);
}
}
}

View File

@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Untappd.Net.Request
{
public abstract class BaseRequest
{
internal readonly string baseRequestString = "https://api.untappd.com";
protected abstract string _EndPoint { get; }
/// <summary>
/// Pass in the parameter into the request...ie username, brewery, etc.
/// </summary>
/// <param name="parameter"></param>
/// <returns></returns>
internal string EndPoint(string parameter)
{
return string.Format(_EndPoint, parameter);
}
}
}

View File

@@ -0,0 +1,49 @@
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Untappd.Client.Net;
using Untappd.Net.Client;
namespace Untappd.Net.Request
{
public class Repository
{
/// <summary>
/// Get the things!
/// </summary>
/// <typeparam name="TResult">What you want to request</typeparam>
/// <param name="credentials">Pass in a credentials object</param>
/// <param name="urlParameter">this is the main parameter for a request. ie v4/user/checkins/urlParameter. Consult the untappd docs, this can be null for a few requests</param>
/// <param name="bodyParameters">Any additional params you wish to add to the request</param>
/// <returns></returns>
public TResult Get<TResult> (IUntappdCredentials credentials, string urlParameter, IDictionary<string, string> bodyParameters = null)
where TResult : UnAuthenticatedRequest,new()
{
// throw new NotImplementedException();
var result = new TResult();
var client = new RestClient(Constants.BaseRequestString);
var request = new RestRequest(result.EndPoint(urlParameter), Method.GET);
request.AddParameter("client_id", credentials.ClientId);
request.AddParameter("client_secret", credentials.ClientSecret);
if (bodyParameters != null)
foreach (var x in bodyParameters)
{
request.AddParameter(x.Key, x.Value);
}
var resp = client.Execute(request);
var jsonresult = JsonConvert.DeserializeObject<TResult>(resp.Content);
return jsonresult;
}
public TResult Get<TResult>(IAuthenticatedUntappdCredentials credentials, string parameter)
where TResult : AuthenticatedRequest, new()
{
throw new NotImplementedException();
}
}
}

View File

@@ -1,38 +0,0 @@
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Untappd.Client.Net;
using Untappd.Net.Client;
namespace Untappd.Net.Request
{
public class Request
{
public TResult Get<T, TResult> (T credentials, string parameter)
where T : IUntappdCredentials
where TResult : BaseRequest,new()
{
// throw new NotImplementedException();
var result = new TResult();
var client = new RestClient(result.baseRequestString);
var request = new RestRequest(result.EndPoint(parameter), Method.GET);
request.AddParameter("client_id", credentials.ClientId);
request.AddParameter("client_secret", credentials.ClientSecret);
var resp = client.Execute(request);
var jsonresult = JsonConvert.DeserializeObject<TResult>(resp.Content);
return jsonresult;
}
public TResult GetAuth<T, TResult>()
where T : AuthenticatedUntappdCredentials
where TResult : BaseRequest, new()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Untappd.Net.Request
{
public abstract class UnAuthenticatedRequest : AuthenticatedRequest
{
protected override abstract string _EndPoint { get; }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,164 +3,411 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.BeerSearch
{
public class BeerSearchRootobject : BaseRequest
public class ResponseTime
{
protected override string _EndPoint { get { return "v4/beer/info/{0}"; } }
public int found { get; set; }
public string term { get; set; }
public Beers beers { get; set; }
public Homebrew homebrew { get; set; }
public Breweries breweries { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Beers
public class InitTime
{
public int count { get; set; }
public Items items { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Items
public class Meta
{
public int checkin_count { get; set; }
public bool have_had { get; set; }
public int your_count { get; set; }
public Beer beer { get; set; }
public Brewery brewery { get; set; }
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Beer
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public int beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_description { get; set; }
public string created_at { get; set; }
public string beer_style { get; set; }
public int auth_rating { get; set; }
public bool wish_list { get; set; }
public int in_production { get; set; }
}
public class Brewery
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact contact { get; set; }
public Location location { get; set; }
public int brewery_active { get; set; }
[JsonProperty("bid")]
public int Bid { get; set; }
[JsonProperty("beer_name")]
public string BeerName { get; set; }
[JsonProperty("beer_label")]
public string BeerLabel { get; set; }
[JsonProperty("beer_abv")]
public double BeerAbv { get; set; }
[JsonProperty("beer_ibu")]
public int BeerIbu { get; set; }
[JsonProperty("beer_description")]
public string BeerDescription { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("beer_style")]
public string BeerStyle { get; set; }
[JsonProperty("auth_rating")]
public int AuthRating { get; set; }
[JsonProperty("wish_list")]
public bool WishList { get; set; }
[JsonProperty("in_production")]
public int InProduction { get; set; }
}
public class Contact
{
public string twitter { get; set; }
public string facebook { get; set; }
public string instagram { get; set; }
public string url { get; set; }
[JsonProperty("twitter")]
public string Twitter { get; set; }
[JsonProperty("facebook")]
public string Facebook { get; set; }
[JsonProperty("instagram")]
public string Instagram { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class Location
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Homebrew
public class Brewery
{
public int count { get; set; }
public Items1 items { get; set; }
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_slug")]
public string BrewerySlug { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("contact")]
public Contact Contact { get; set; }
[JsonProperty("location")]
public Location Location { get; set; }
[JsonProperty("brewery_active")]
public int BreweryActive { get; set; }
}
public class Items1
public class Item
{
public int checkin_count { get; set; }
public bool have_had { get; set; }
public int your_count { get; set; }
public Beer1 beer { get; set; }
public Brewery1 brewery { get; set; }
[JsonProperty("checkin_count")]
public int CheckinCount { get; set; }
[JsonProperty("have_had")]
public bool HaveHad { get; set; }
[JsonProperty("your_count")]
public int YourCount { get; set; }
[JsonProperty("beer")]
public Beer Beer { get; set; }
[JsonProperty("brewery")]
public Brewery Brewery { get; set; }
}
public class Beer1
public class Beers
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public int beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_description { get; set; }
public string created_at { get; set; }
public string beer_style { get; set; }
public int auth_rating { get; set; }
public bool wish_list { get; set; }
public int in_production { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class Brewery1
public class Beer2
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact1 contact { get; set; }
public Location1 location { get; set; }
public int brewery_active { get; set; }
[JsonProperty("bid")]
public int Bid { get; set; }
[JsonProperty("beer_name")]
public string BeerName { get; set; }
[JsonProperty("beer_label")]
public string BeerLabel { get; set; }
[JsonProperty("beer_abv")]
public double BeerAbv { get; set; }
[JsonProperty("beer_ibu")]
public int BeerIbu { get; set; }
[JsonProperty("beer_description")]
public string BeerDescription { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("beer_style")]
public string BeerStyle { get; set; }
[JsonProperty("auth_rating")]
public int AuthRating { get; set; }
[JsonProperty("wish_list")]
public bool WishList { get; set; }
[JsonProperty("in_production")]
public int InProduction { get; set; }
}
public class Contact1
public class Contact2
{
public string twitter { get; set; }
public string facebook { get; set; }
public string instagram { get; set; }
public string url { get; set; }
}
public class Location1
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public int lat { get; set; }
public int lng { get; set; }
}
[JsonProperty("twitter")]
public string Twitter { get; set; }
public class Breweries
{
public int count { get; set; }
public Items2 items { get; set; }
}
[JsonProperty("facebook")]
public string Facebook { get; set; }
public class Items2
{
public Brewery2 brewery { get; set; }
}
[JsonProperty("instagram")]
public string Instagram { get; set; }
public class Brewery2
{
public int brewery_id { get; set; }
public int beer_count { get; set; }
public string brewery_name { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Location2 location { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class Location2
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public int lat { get; set; }
public int lng { get; set; }
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public int Lat { get; set; }
[JsonProperty("lng")]
public int Lng { get; set; }
}
public class Brewery2
{
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_slug")]
public string BrewerySlug { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("contact")]
public Contact2 Contact { get; set; }
[JsonProperty("location")]
public Location2 Location { get; set; }
[JsonProperty("brewery_active")]
public int BreweryActive { get; set; }
}
public class Item2
{
[JsonProperty("checkin_count")]
public int CheckinCount { get; set; }
[JsonProperty("have_had")]
public bool HaveHad { get; set; }
[JsonProperty("your_count")]
public int YourCount { get; set; }
[JsonProperty("beer")]
public Beer2 Beer { get; set; }
[JsonProperty("brewery")]
public Brewery2 Brewery { get; set; }
}
public class Homebrew
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item2> Items { get; set; }
}
public class Location3
{
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public int Lat { get; set; }
[JsonProperty("lng")]
public int Lng { get; set; }
}
public class Brewery3
{
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("beer_count")]
public int BeerCount { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("location")]
public Location3 Location { get; set; }
}
public class Item3
{
[JsonProperty("brewery")]
public Brewery3 Brewery { get; set; }
}
public class Breweries
{
[JsonProperty("items")]
public IList<Item3> Items { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
}
public class Response
{
[JsonProperty("message")]
public string Message { get; set; }
[JsonProperty("brewery_id")]
public bool BreweryId { get; set; }
[JsonProperty("search_type")]
public string SearchType { get; set; }
[JsonProperty("type_id")]
public int TypeId { get; set; }
[JsonProperty("search_version")]
public int SearchVersion { get; set; }
[JsonProperty("found")]
public int Found { get; set; }
[JsonProperty("offset")]
public int Offset { get; set; }
[JsonProperty("limit")]
public int Limit { get; set; }
[JsonProperty("term")]
public string Term { get; set; }
[JsonProperty("parsed_term")]
public string ParsedTerm { get; set; }
[JsonProperty("beers")]
public Beers Beers { get; set; }
[JsonProperty("homebrew")]
public Homebrew Homebrew { get; set; }
[JsonProperty("breweries")]
public Breweries Breweries { get; set; }
}
public class BeerSearch : UnAuthenticatedRequest
{
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
protected override string _EndPoint
{
get { return "v4/search/beer"; }
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,45 +3,138 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.BrewerySearch
{
public class BrewerySearchRootobject : BaseRequest
public class ResponseTime
{
public int found { get; set; }
public Brewery brewery { get; set; }
protected override string _EndPoint { get { return "v4/search/beer/{0}"; } }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Brewery
public class InitTime
{
public int count { get; set; }
public Items items { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Items
public class Meta
{
public Brewery1 brewery { get; set; }
}
public class Brewery1
{
public int brewery_id { get; set; }
public int beer_count { get; set; }
public string brewery_name { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Location location { get; set; }
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Location
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public int lat { get; set; }
public int lng { get; set; }
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public int Lat { get; set; }
[JsonProperty("lng")]
public int Lng { get; set; }
}
public class Brewery2
{
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("beer_count")]
public int BeerCount { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("location")]
public Location Location { get; set; }
}
public class Item
{
[JsonProperty("brewery")]
public Brewery2 Brewery { get; set; }
}
public class Brewery
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class Response
{
[JsonProperty("search_type")]
public string SearchType { get; set; }
[JsonProperty("sort")]
public string Sort { get; set; }
[JsonProperty("term")]
public string Term { get; set; }
[JsonProperty("key")]
public string Key { get; set; }
[JsonProperty("found")]
public int Found { get; set; }
[JsonProperty("brewery")]
public Brewery Brewery { get; set; }
}
public class BrewerySearch : UnAuthenticatedRequest
{
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
protected override string _EndPoint
{
get { return "v4/search/brewery"; }
}
}
}

View File

@@ -0,0 +1,448 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.Feeds
{
public class ResponseTime
{
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class InitTime
{
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Meta
{
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Pagination
{
[JsonProperty("since_url")]
public string SinceUrl { get; set; }
[JsonProperty("next_url")]
public string NextUrl { get; set; }
[JsonProperty("max_id")]
public int MaxId { get; set; }
}
public class Contact
{
[JsonProperty("facebook")]
public int Facebook { get; set; }
[JsonProperty("twitter")]
public string Twitter { get; set; }
}
public class User
{
[JsonProperty("uid")]
public int Uid { get; set; }
[JsonProperty("user_name")]
public string UserName { get; set; }
[JsonProperty("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
public string LastName { get; set; }
[JsonProperty("location")]
public string Location { get; set; }
[JsonProperty("is_supporter")]
public int IsSupporter { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
[JsonProperty("bio")]
public string Bio { get; set; }
[JsonProperty("relationship")]
public object Relationship { get; set; }
[JsonProperty("user_avatar")]
public string UserAvatar { get; set; }
[JsonProperty("is_private")]
public int IsPrivate { get; set; }
[JsonProperty("contact")]
public Contact Contact { get; set; }
}
public class Beer
{
[JsonProperty("bid")]
public int Bid { get; set; }
[JsonProperty("beer_name")]
public string BeerName { get; set; }
[JsonProperty("beer_label")]
public string BeerLabel { get; set; }
[JsonProperty("beer_style")]
public string BeerStyle { get; set; }
[JsonProperty("beer_abv")]
public double BeerAbv { get; set; }
[JsonProperty("auth_rating")]
public int AuthRating { get; set; }
[JsonProperty("wish_list")]
public bool WishList { get; set; }
[JsonProperty("beer_active")]
public int BeerActive { get; set; }
}
public class Contact2
{
[JsonProperty("twitter")]
public string Twitter { get; set; }
[JsonProperty("facebook")]
public string Facebook { get; set; }
[JsonProperty("instagram")]
public string Instagram { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class Location
{
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Brewery
{
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_slug")]
public string BrewerySlug { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("contact")]
public Contact2 Contact { get; set; }
[JsonProperty("location")]
public Location Location { get; set; }
[JsonProperty("brewery_active")]
public int BreweryActive { get; set; }
}
public class Comments
{
[JsonProperty("total_count")]
public int TotalCount { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class User2
{
[JsonProperty("uid")]
public int Uid { get; set; }
[JsonProperty("user_name")]
public string UserName { get; set; }
[JsonProperty("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
public string LastName { get; set; }
[JsonProperty("bio")]
public string Bio { get; set; }
[JsonProperty("location")]
public string Location { get; set; }
[JsonProperty("user_avatar")]
public string UserAvatar { get; set; }
[JsonProperty("user_link")]
public string UserLink { get; set; }
[JsonProperty("account_type")]
public string AccountType { get; set; }
[JsonProperty("brewery_details")]
public object BreweryDetails { get; set; }
}
public class Item2
{
[JsonProperty("uid")]
public int Uid { get; set; }
[JsonProperty("user")]
public User2 User { get; set; }
[JsonProperty("like_id")]
public int LikeId { get; set; }
[JsonProperty("like_owner")]
public bool LikeOwner { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
}
public class Toasts
{
[JsonProperty("total_count")]
public int TotalCount { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("auth_toast")]
public object AuthToast { get; set; }
[JsonProperty("items")]
public IList<Item2> Items { get; set; }
}
public class Photo
{
[JsonProperty("photo_img_sm")]
public string PhotoImgSm { get; set; }
[JsonProperty("photo_img_md")]
public string PhotoImgMd { get; set; }
[JsonProperty("photo_img_lg")]
public string PhotoImgLg { get; set; }
[JsonProperty("photo_img_og")]
public string PhotoImgOg { get; set; }
}
public class Item3
{
[JsonProperty("photo_id")]
public int PhotoId { get; set; }
[JsonProperty("photo")]
public Photo Photo { get; set; }
}
public class Media
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item3> Items { get; set; }
}
public class Source
{
[JsonProperty("app_name")]
public string AppName { get; set; }
[JsonProperty("app_website")]
public string AppWebsite { get; set; }
}
public class BadgeImage
{
[JsonProperty("sm")]
public string Sm { get; set; }
[JsonProperty("md")]
public string Md { get; set; }
[JsonProperty("lg")]
public string Lg { get; set; }
}
public class Item4
{
[JsonProperty("badge_id")]
public int BadgeId { get; set; }
[JsonProperty("user_badge_id")]
public int UserBadgeId { get; set; }
[JsonProperty("badge_name")]
public string BadgeName { get; set; }
[JsonProperty("badge_description")]
public string BadgeDescription { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("badge_image")]
public BadgeImage BadgeImage { get; set; }
}
public class Badges
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item4> Items { get; set; }
}
public class Item
{
[JsonProperty("checkin_id")]
public int CheckinId { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("checkin_comment")]
public string CheckinComment { get; set; }
[JsonProperty("rating_score")]
public double RatingScore { get; set; }
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("beer")]
public Beer Beer { get; set; }
[JsonProperty("brewery")]
public Brewery Brewery { get; set; }
[JsonProperty("venue")]
public object Venue { get; set; }
[JsonProperty("comments")]
public Comments Comments { get; set; }
[JsonProperty("toasts")]
public Toasts Toasts { get; set; }
[JsonProperty("media")]
public Media Media { get; set; }
[JsonProperty("source")]
public Source Source { get; set; }
[JsonProperty("badges")]
public Badges Badges { get; set; }
}
public class Checkins
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class Response
{
[JsonProperty("pagination")]
public Pagination Pagination { get; set; }
[JsonProperty("checkins")]
public Checkins Checkins { get; set; }
}
public class UserActivityFeed : UnAuthenticatedRequest
{
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
protected override string _EndPoint
{
get { return "v4/user/checkins/{0}"; }
}
}
}

View File

@@ -3,64 +3,145 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.UserBadges
{
public class UserBadgesRootobject : BaseRequest
public class ResponseTime
{
public string type { get; set; }
public string sort { get; set; }
public int count { get; set; }
public Item[] items { get; set; }
protected override string _EndPoint { get { return "v4/user/badges/{0}"; } }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Item
public class InitTime
{
public int user_badge_id { get; set; }
public int badge_id { get; set; }
public int checkin_id { get; set; }
public string badge_name { get; set; }
public string badge_description { get; set; }
public int badge_active_status { get; set; }
public Media media { get; set; }
public string created_at { get; set; }
public bool is_level { get; set; }
public int category_id { get; set; }
public Levels levels { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Meta
{
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Media
{
public string badge_image_sm { get; set; }
public string badge_image_md { get; set; }
public string badge_image_lg { get; set; }
[JsonProperty("badge_image_sm")]
public string BadgeImageSm { get; set; }
[JsonProperty("badge_image_md")]
public string BadgeImageMd { get; set; }
[JsonProperty("badge_image_lg")]
public string BadgeImageLg { get; set; }
}
public class Levels
public class BadgePackProgress
{
public int count { get; set; }
public Item1[] items { get; set; }
[JsonProperty("completed")]
public int Completed { get; set; }
[JsonProperty("total")]
public int Total { get; set; }
}
public class Item1
public class Item
{
public int actual_badge_id { get; set; }
public int badge_id { get; set; }
public int checkin_id { get; set; }
public string badge_name { get; set; }
public string badge_description { get; set; }
public Media1 media { get; set; }
public string created_at { get; set; }
[JsonProperty("badge_id")]
public int BadgeId { get; set; }
[JsonProperty("user_badge_id")]
public int UserBadgeId { get; set; }
[JsonProperty("checkin_id")]
public int CheckinId { get; set; }
[JsonProperty("badge_name")]
public string BadgeName { get; set; }
[JsonProperty("badge_description")]
public string BadgeDescription { get; set; }
[JsonProperty("badge_hint")]
public string BadgeHint { get; set; }
[JsonProperty("badge_active_status")]
public int BadgeActiveStatus { get; set; }
[JsonProperty("media")]
public Media Media { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("is_level")]
public bool IsLevel { get; set; }
[JsonProperty("category_id")]
public int CategoryId { get; set; }
[JsonProperty("levels")]
public object Levels { get; set; }
[JsonProperty("badge_pack")]
public int BadgePack { get; set; }
[JsonProperty("badge_pack_name")]
public bool BadgePackName { get; set; }
[JsonProperty("badge_pack_progress")]
public BadgePackProgress BadgePackProgress { get; set; }
}
public class Media1
public class Response
{
public string badge_image_sm { get; set; }
public string badge_image_md { get; set; }
public string badge_image_lg { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("sort")]
public string Sort { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class UserBadges : UnAuthenticatedRequest
{
protected override string _EndPoint { get { return "v4/user/badges/{0}"; } }
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
}
}

View File

@@ -3,81 +3,224 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.UserDistinctBeer
{
public class UserDistinctBeerRootobject : BaseRequest
public class ResponseTime
{
public Beers beers { get; set; }
protected override string _EndPoint { get { throw new NotImplementedException(); } }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Beers
public class InitTime
{
public string sort { get; set; }
public string sort_english { get; set; }
public int count { get; set; }
public Items items { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Items
public class Meta
{
public int first_checkin_id { get; set; }
public string first_created_at { get; set; }
public int recent_checkin_id { get; set; }
public string recent_created_at { get; set; }
public string recent_created_at_timezone { get; set; }
public float rating_score { get; set; }
public string first_had { get; set; }
public int count { get; set; }
public Beer beer { get; set; }
public Brewery brewery { get; set; }
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Beer
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public float beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_slug { get; set; }
public string beer_style { get; set; }
public string beer_description { get; set; }
public string created_at { get; set; }
public float auth_rating { get; set; }
public bool wish_list { get; set; }
public float rating_score { get; set; }
}
public class Brewery
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact contact { get; set; }
public Location location { get; set; }
public int brewery_active { get; set; }
[JsonProperty("bid")]
public int Bid { get; set; }
[JsonProperty("beer_name")]
public string BeerName { get; set; }
[JsonProperty("beer_label")]
public string BeerLabel { get; set; }
[JsonProperty("beer_abv")]
public double BeerAbv { get; set; }
[JsonProperty("beer_ibu")]
public int BeerIbu { get; set; }
[JsonProperty("beer_slug")]
public string BeerSlug { get; set; }
[JsonProperty("beer_style")]
public string BeerStyle { get; set; }
[JsonProperty("beer_description")]
public string BeerDescription { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("auth_rating")]
public int AuthRating { get; set; }
[JsonProperty("wish_list")]
public bool WishList { get; set; }
[JsonProperty("rating_score")]
public double RatingScore { get; set; }
[JsonProperty("rating_count")]
public int RatingCount { get; set; }
}
public class Contact
{
public string twitter { get; set; }
public string facebook { get; set; }
public string instagram { get; set; }
public string url { get; set; }
[JsonProperty("twitter")]
public string Twitter { get; set; }
[JsonProperty("facebook")]
public string Facebook { get; set; }
[JsonProperty("instagram")]
public string Instagram { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class Location
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Brewery
{
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_slug")]
public string BrewerySlug { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("contact")]
public Contact Contact { get; set; }
[JsonProperty("location")]
public Location Location { get; set; }
[JsonProperty("brewery_active")]
public int BreweryActive { get; set; }
}
public class Item
{
[JsonProperty("first_checkin_id")]
public int FirstCheckinId { get; set; }
[JsonProperty("first_created_at")]
public string FirstCreatedAt { get; set; }
[JsonProperty("recent_checkin_id")]
public int RecentCheckinId { get; set; }
[JsonProperty("recent_created_at")]
public string RecentCreatedAt { get; set; }
[JsonProperty("recent_created_at_timezone")]
public string RecentCreatedAtTimezone { get; set; }
[JsonProperty("rating_score")]
public double RatingScore { get; set; }
[JsonProperty("first_had")]
public string FirstHad { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("beer")]
public Beer Beer { get; set; }
[JsonProperty("brewery")]
public Brewery Brewery { get; set; }
}
public class Beers
{
[JsonProperty("sort")]
public string Sort { get; set; }
[JsonProperty("sort_english")]
public string SortEnglish { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class Response
{
[JsonProperty("is_search")]
public bool IsSearch { get; set; }
[JsonProperty("beers")]
public Beers Beers { get; set; }
}
public class UserDistinctBeers : UnAuthenticatedRequest
{
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
protected override string _EndPoint
{
get { return "v4/user/beers/{0}"; }
}
}
}

View File

@@ -3,43 +3,123 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.UserFriends
{
public class UserFriendsRootobject : BaseRequest
public class ResponseTime
{
protected override string _EndPoint { get { return "v4/user/friends/{0}"; } }
public int count { get; set; }
public Item[] items { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Item
public class InitTime
{
public string friendship_hash { get; set; }
public string created_at { get; set; }
public User user { get; set; }
public Mutual_Friends mutual_friends { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Meta
{
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class User
{
public int uid { get; set; }
public string user_name { get; set; }
public string location { get; set; }
public string bio { get; set; }
public int is_supporter { get; set; }
public string first_name { get; set; }
public string last_name { get; set; }
public string relationship { get; set; }
public string user_avatar { get; set; }
[JsonProperty("uid")]
public int Uid { get; set; }
[JsonProperty("user_name")]
public string UserName { get; set; }
[JsonProperty("location")]
public string Location { get; set; }
[JsonProperty("bio")]
public string Bio { get; set; }
[JsonProperty("is_supporter")]
public int IsSupporter { get; set; }
[JsonProperty("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
public string LastName { get; set; }
[JsonProperty("relationship")]
public string Relationship { get; set; }
[JsonProperty("user_avatar")]
public string UserAvatar { get; set; }
}
public class Mutual_Friends
public class MutualFriends
{
public int count { get; set; }
public object[] items { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Item
{
[JsonProperty("friendship_hash")]
public string FriendshipHash { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("mutual_friends")]
public MutualFriends MutualFriends { get; set; }
}
public class Response
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class UserFriends : UnAuthenticatedRequest
{
protected override string _EndPoint { get { return "v4/user/friends/{0}"; } }
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,75 +3,83 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.UserWishlist
{
public class UserWishlistRootobject : BaseRequest
public class ResponseTime
{
public Beers beers { get; set; }
protected override string _EndPoint { get { throw new NotImplementedException(); } }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class InitTime
{
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Meta
{
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Beers
{
public int count { get; set; }
public Items items { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Items
public class Response
{
public string created_at { get; set; }
public Beer beer { get; set; }
public Brewery brewery { get; set; }
public object[] friends { get; set; }
[JsonProperty("sort")]
public string Sort { get; set; }
[JsonProperty("sort_english")]
public string SortEnglish { get; set; }
[JsonProperty("type_id")]
public int TypeId { get; set; }
[JsonProperty("beers")]
public Beers Beers { get; set; }
}
public class Beer
public class UserWishList : UnAuthenticatedRequest
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public float beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_slug { get; set; }
public string beer_description { get; set; }
public int is_in_production { get; set; }
public string beer_style { get; set; }
public string created_at { get; set; }
public int auth_rating { get; set; }
public float rating_score { get; set; }
public int rating_count { get; set; }
public bool wish_list { get; set; }
protected override string _EndPoint { get { return "/v4/user/wishlist/{0}"; } }
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
}
public class Brewery
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact contact { get; set; }
public Location location { get; set; }
public int brewery_active { get; set; }
}
public class Contact
{
public string twitter { get; set; }
public string facebook { get; set; }
public string instagram { get; set; }
public string url { get; set; }
}
public class Location
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public float lat { get; set; }
public float lng { get; set; }
}
}

View File

@@ -3,290 +3,577 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Untappd.Net.Request;
namespace Untappd.Net.Responses.VenueInfo
{
public class VenueInfoRootobject : BaseRequest
public class ResponseTime
{
public Venue venue { get; set; }
protected override string _EndPoint { get { return "v4/venue/info/{0}"; } }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Venue
public class InitTime
{
public int venue_id { get; set; }
public string venue_name { get; set; }
public string last_updated { get; set; }
public string primary_category { get; set; }
public Categories categories { get; set; }
public Stats stats { get; set; }
public Venue_Icon venue_icon { get; set; }
public bool public_venue { get; set; }
public Location location { get; set; }
public Contact contact { get; set; }
public Foursquare foursquare { get; set; }
public Media media { get; set; }
public Top_Beers top_beers { get; set; }
[JsonProperty("time")]
public double Time { get; set; }
[JsonProperty("measure")]
public string Measure { get; set; }
}
public class Categories
public class Meta
{
public int count { get; set; }
public Item[] items { get; set; }
[JsonProperty("code")]
public int Code { get; set; }
[JsonProperty("response_time")]
public ResponseTime ResponseTime { get; set; }
[JsonProperty("init_time")]
public InitTime InitTime { get; set; }
}
public class Item
{
public string category_name { get; set; }
public string category_id { get; set; }
public bool is_primary { get; set; }
[JsonProperty("category_name")]
public string CategoryName { get; set; }
[JsonProperty("category_id")]
public string CategoryId { get; set; }
[JsonProperty("is_primary")]
public bool IsPrimary { get; set; }
}
public class Categories
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item> Items { get; set; }
}
public class Stats
{
public int total_count { get; set; }
public int user_count { get; set; }
public int total_user_count { get; set; }
public int monthly_count { get; set; }
public int weekly_count { get; set; }
[JsonProperty("total_count")]
public int TotalCount { get; set; }
[JsonProperty("user_count")]
public int UserCount { get; set; }
[JsonProperty("total_user_count")]
public int TotalUserCount { get; set; }
[JsonProperty("monthly_count")]
public int MonthlyCount { get; set; }
[JsonProperty("weekly_count")]
public int WeeklyCount { get; set; }
}
public class Venue_Icon
public class VenueIcon
{
public string sm { get; set; }
public string md { get; set; }
public string lg { get; set; }
[JsonProperty("sm")]
public string Sm { get; set; }
[JsonProperty("md")]
public string Md { get; set; }
[JsonProperty("lg")]
public string Lg { get; set; }
}
public class Location
{
public string venue_address { get; set; }
public string venue_city { get; set; }
public string venue_state { get; set; }
public string venue_country { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("venue_address")]
public string VenueAddress { get; set; }
[JsonProperty("venue_city")]
public string VenueCity { get; set; }
[JsonProperty("venue_state")]
public string VenueState { get; set; }
[JsonProperty("venue_country")]
public object VenueCountry { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Contact
{
public string twitter { get; set; }
public string venue_url { get; set; }
[JsonProperty("twitter")]
public object Twitter { get; set; }
[JsonProperty("venue_url")]
public object VenueUrl { get; set; }
}
public class Foursquare
{
public string foursquare_id { get; set; }
public string foursquare_url { get; set; }
[JsonProperty("foursquare_id")]
public object FoursquareId { get; set; }
[JsonProperty("foursquare_url")]
public object FoursquareUrl { get; set; }
}
public class Media
{
public int count { get; set; }
public Items items { get; set; }
}
public class Items
{
public int photo_id { get; set; }
public Photo photo { get; set; }
public string created_at { get; set; }
public int checkin_id { get; set; }
public Beer beer { get; set; }
public Brewery brewery { get; set; }
public User user { get; set; }
public Venue1 venue { get; set; }
}
[JsonProperty("count")]
public int Count { get; set; }
public class Photo
{
public string photo_img_sm { get; set; }
public string photo_img_md { get; set; }
public string photo_img_lg { get; set; }
public string photo_img_og { get; set; }
}
public class Beer
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public int beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_slug { get; set; }
public string beer_description { get; set; }
public int is_in_production { get; set; }
public int beer_style_id { get; set; }
public string beer_style { get; set; }
public int auth_rating { get; set; }
public bool wish_list { get; set; }
public int beer_active { get; set; }
}
public class Brewery
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact1 contact { get; set; }
public Location1 location { get; set; }
public int brewery_active { get; set; }
}
public class Contact1
{
public string twitter { get; set; }
public string facebook { get; set; }
public string url { get; set; }
}
public class Location1
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class User
{
public int uid { get; set; }
public string user_name { get; set; }
public string first_name { get; set; }
public string last_name { get; set; }
public string user_avatar { get; set; }
public string relationship { get; set; }
public int is_private { get; set; }
[JsonProperty("uid")]
public int Uid { get; set; }
[JsonProperty("user_name")]
public string UserName { get; set; }
[JsonProperty("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
public string LastName { get; set; }
[JsonProperty("relationship")]
public object Relationship { get; set; }
[JsonProperty("is_supporter")]
public int IsSupporter { get; set; }
[JsonProperty("user_avatar")]
public string UserAvatar { get; set; }
[JsonProperty("is_private")]
public int IsPrivate { get; set; }
}
public class Venue1
public class Beer
{
public int venue_id { get; set; }
public string venue_name { get; set; }
public string primary_category { get; set; }
public string parent_category_id { get; set; }
public Categories1 categories { get; set; }
public Location2 location { get; set; }
public Contact2 contact { get; set; }
public bool public_venue { get; set; }
public Foursquare1 foursquare { get; set; }
public Venue_Icon1 venue_icon { get; set; }
}
public class Categories1
{
public int count { get; set; }
public Item1[] items { get; set; }
}
[JsonProperty("bid")]
public int Bid { get; set; }
public class Item1
{
public string category_name { get; set; }
public string category_id { get; set; }
public bool is_primary { get; set; }
}
[JsonProperty("beer_name")]
public string BeerName { get; set; }
public class Location2
{
public string venue_address { get; set; }
public string venue_city { get; set; }
public string venue_state { get; set; }
public string venue_country { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("beer_abv")]
public double BeerAbv { get; set; }
[JsonProperty("beer_label")]
public string BeerLabel { get; set; }
[JsonProperty("beer_style")]
public string BeerStyle { get; set; }
[JsonProperty("auth_rating")]
public int AuthRating { get; set; }
[JsonProperty("wish_list")]
public bool WishList { get; set; }
[JsonProperty("beer_active")]
public int BeerActive { get; set; }
}
public class Contact2
{
public string twitter { get; set; }
public string venue_url { get; set; }
[JsonProperty("twitter")]
public string Twitter { get; set; }
[JsonProperty("facebook")]
public string Facebook { get; set; }
[JsonProperty("instagram")]
public string Instagram { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class Foursquare1
public class Location2
{
public string foursquare_id { get; set; }
public string foursquare_url { get; set; }
[JsonProperty("brewery_city")]
public string BreweryCity { get; set; }
[JsonProperty("brewery_state")]
public string BreweryState { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Venue_Icon1
public class Brewery
{
public string sm { get; set; }
public string md { get; set; }
public string lg { get; set; }
[JsonProperty("brewery_id")]
public int BreweryId { get; set; }
[JsonProperty("brewery_name")]
public string BreweryName { get; set; }
[JsonProperty("brewery_slug")]
public string BrewerySlug { get; set; }
[JsonProperty("brewery_label")]
public string BreweryLabel { get; set; }
[JsonProperty("country_name")]
public string CountryName { get; set; }
[JsonProperty("contact")]
public Contact2 Contact { get; set; }
[JsonProperty("location")]
public Location2 Location { get; set; }
[JsonProperty("brewery_active")]
public int BreweryActive { get; set; }
}
public class Top_Beers
public class Item3
{
public int offset { get; set; }
public int limit { get; set; }
public int count { get; set; }
public Items1 items { get; set; }
[JsonProperty("category_name")]
public string CategoryName { get; set; }
[JsonProperty("category_id")]
public string CategoryId { get; set; }
[JsonProperty("is_primary")]
public bool IsPrimary { get; set; }
}
public class Items1
public class Categories2
{
public string created_at { get; set; }
public int total_count { get; set; }
public int your_count { get; set; }
public Beer1 beer { get; set; }
public Brewery1 brewery { get; set; }
public Friends friends { get; set; }
}
public class Beer1
{
public int bid { get; set; }
public string beer_name { get; set; }
public string beer_label { get; set; }
public int beer_abv { get; set; }
public int beer_ibu { get; set; }
public string beer_slug { get; set; }
public string beer_description { get; set; }
public int is_in_production { get; set; }
public int beer_style_id { get; set; }
public string beer_style { get; set; }
public int auth_rating { get; set; }
public bool wish_list { get; set; }
public int beer_active { get; set; }
public float rating_score { get; set; }
public int rating_count { get; set; }
}
[JsonProperty("count")]
public int Count { get; set; }
public class Brewery1
{
public int brewery_id { get; set; }
public string brewery_name { get; set; }
public string brewery_slug { get; set; }
public string brewery_label { get; set; }
public string country_name { get; set; }
public Contact3 contact { get; set; }
public Location3 location { get; set; }
public int brewery_active { get; set; }
}
public class Contact3
{
public string twitter { get; set; }
public string facebook { get; set; }
public string url { get; set; }
[JsonProperty("items")]
public IList<Item3> Items { get; set; }
}
public class Location3
{
public string brewery_city { get; set; }
public string brewery_state { get; set; }
public float lat { get; set; }
public float lng { get; set; }
[JsonProperty("venue_address")]
public string VenueAddress { get; set; }
[JsonProperty("venue_city")]
public string VenueCity { get; set; }
[JsonProperty("venue_state")]
public string VenueState { get; set; }
[JsonProperty("venue_country")]
public object VenueCountry { get; set; }
[JsonProperty("lat")]
public double Lat { get; set; }
[JsonProperty("lng")]
public double Lng { get; set; }
}
public class Friends
public class Contact3
{
public int count { get; set; }
public object[] items { get; set; }
[JsonProperty("twitter")]
public object Twitter { get; set; }
[JsonProperty("venue_url")]
public object VenueUrl { get; set; }
}
public class Foursquare2
{
[JsonProperty("foursquare_id")]
public object FoursquareId { get; set; }
[JsonProperty("foursquare_url")]
public object FoursquareUrl { get; set; }
}
public class VenueIcon2
{
[JsonProperty("sm")]
public string Sm { get; set; }
[JsonProperty("md")]
public string Md { get; set; }
[JsonProperty("lg")]
public string Lg { get; set; }
}
public class Venue2
{
[JsonProperty("venue_id")]
public int VenueId { get; set; }
[JsonProperty("venue_name")]
public string VenueName { get; set; }
[JsonProperty("primary_category")]
public string PrimaryCategory { get; set; }
[JsonProperty("parent_category_id")]
public string ParentCategoryId { get; set; }
[JsonProperty("categories")]
public Categories2 Categories { get; set; }
[JsonProperty("location")]
public Location3 Location { get; set; }
[JsonProperty("contact")]
public Contact3 Contact { get; set; }
[JsonProperty("public_venue")]
public bool PublicVenue { get; set; }
[JsonProperty("foursquare")]
public Foursquare2 Foursquare { get; set; }
[JsonProperty("venue_icon")]
public VenueIcon2 VenueIcon { get; set; }
}
public class Comments
{
[JsonProperty("total_count")]
public int TotalCount { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Toasts
{
[JsonProperty("total_count")]
public int TotalCount { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("auth_toast")]
public object AuthToast { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Media2
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Source
{
[JsonProperty("app_name")]
public string AppName { get; set; }
[JsonProperty("app_website")]
public object AppWebsite { get; set; }
}
public class Badges
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Item2
{
[JsonProperty("checkin_id")]
public int CheckinId { get; set; }
[JsonProperty("created_at")]
public string CreatedAt { get; set; }
[JsonProperty("rating_score")]
public int RatingScore { get; set; }
[JsonProperty("checkin_comment")]
public string CheckinComment { get; set; }
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("beer")]
public Beer Beer { get; set; }
[JsonProperty("brewery")]
public Brewery Brewery { get; set; }
[JsonProperty("venue")]
public Venue2 Venue { get; set; }
[JsonProperty("comments")]
public Comments Comments { get; set; }
[JsonProperty("toasts")]
public Toasts Toasts { get; set; }
[JsonProperty("media")]
public Media2 Media { get; set; }
[JsonProperty("source")]
public Source Source { get; set; }
[JsonProperty("badges")]
public Badges Badges { get; set; }
}
public class Checkins
{
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<Item2> Items { get; set; }
}
public class TopBeers
{
[JsonProperty("offset")]
public int Offset { get; set; }
[JsonProperty("limit")]
public int Limit { get; set; }
[JsonProperty("count")]
public int Count { get; set; }
[JsonProperty("items")]
public IList<object> Items { get; set; }
}
public class Venue
{
[JsonProperty("venue_id")]
public int VenueId { get; set; }
[JsonProperty("venue_name")]
public string VenueName { get; set; }
[JsonProperty("last_updated")]
public string LastUpdated { get; set; }
[JsonProperty("primary_category")]
public string PrimaryCategory { get; set; }
[JsonProperty("categories")]
public Categories Categories { get; set; }
[JsonProperty("stats")]
public Stats Stats { get; set; }
[JsonProperty("venue_icon")]
public VenueIcon VenueIcon { get; set; }
[JsonProperty("public_venue")]
public bool PublicVenue { get; set; }
[JsonProperty("location")]
public Location Location { get; set; }
[JsonProperty("contact")]
public Contact Contact { get; set; }
[JsonProperty("foursquare")]
public Foursquare Foursquare { get; set; }
[JsonProperty("media")]
public Media Media { get; set; }
[JsonProperty("checkins")]
public Checkins Checkins { get; set; }
[JsonProperty("top_beers")]
public TopBeers TopBeers { get; set; }
}
public class Response
{
[JsonProperty("venue")]
public Venue Venue { get; set; }
}
public class VenueInfo : UnAuthenticatedRequest
{
[JsonProperty("meta")]
public Meta Meta { get; set; }
[JsonProperty("notifications")]
public IList<object> Notifications { get; set; }
[JsonProperty("response")]
public Response Response { get; set; }
protected override string _EndPoint
{
get { return "v4/venue/info/{0}"; }
}
}
}

View File

@@ -47,10 +47,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Client\AuthenticatedUntappdCredentials.cs" />
<Compile Include="Client\IAuthenticatedUntappdCredentials.cs" />
<Compile Include="Client\IUntappdCredentials.cs" />
<Compile Include="Client\UnAuthenticatedUntappdCredentials.cs" />
<Compile Include="Constants.cs" />
<Compile Include="Request\AuthenticatedRequest.cs" />
<Compile Include="Request\BaseRequest.cs" />
<Compile Include="Request\UnAuthenticatedRequest.cs" />
<Compile Include="Responses\BeerInfo.cs" />
<Compile Include="Responses\BeerSearch.cs" />
<Compile Include="Responses\BreweryInfo.cs" />