From a445c7d2ffc7d7150e4d88c9c43196d557709ac2 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 8 Apr 2015 01:19:02 -0400 Subject: [PATCH] committing for now --- Untappd.Net.sln | 28 ++ src/Untappd.Net.UnitTests/Class1.cs | 23 + .../Properties/AssemblyInfo.cs | 36 ++ .../Untappd.Net.UnitTests.csproj | 84 ++++ src/Untappd.Net.UnitTests/packages.config | 5 + .../Client/AuthenticatedUntappdCredentials.cs | 26 + src/Untappd.Net/Client/IUntappdCredentials.cs | 14 + .../UnAuthenticatedUntappdCredentials.cs | 34 ++ src/Untappd.Net/Properties/AssemblyInfo.cs | 36 ++ .../Request/AuthenticatedRequest.cs | 13 + src/Untappd.Net/Request/BaseRequest.cs | 24 + src/Untappd.Net/Request/Request.cs | 38 ++ src/Untappd.Net/Responses/BeerInfo.cs | 299 +++++++++++ src/Untappd.Net/Responses/BeerSearch.cs | 166 ++++++ src/Untappd.Net/Responses/BreweryInfo.cs | 230 +++++++++ src/Untappd.Net/Responses/BrewerySearch.cs | 47 ++ src/Untappd.Net/Responses/UserBadges.cs | 66 +++ src/Untappd.Net/Responses/UserDistinctBeer.cs | 83 +++ src/Untappd.Net/Responses/UserFriends.cs | 45 ++ src/Untappd.Net/Responses/UserInfo.cs | 474 ++++++++++++++++++ src/Untappd.Net/Responses/UserWishlist.cs | 77 +++ src/Untappd.Net/Responses/VenueInfo.cs | 292 +++++++++++ src/Untappd.Net/Untappd.Net.csproj | 78 +++ src/Untappd.Net/packages.config | 5 + 24 files changed, 2223 insertions(+) create mode 100644 Untappd.Net.sln create mode 100644 src/Untappd.Net.UnitTests/Class1.cs create mode 100644 src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs create mode 100644 src/Untappd.Net.UnitTests/Untappd.Net.UnitTests.csproj create mode 100644 src/Untappd.Net.UnitTests/packages.config create mode 100644 src/Untappd.Net/Client/AuthenticatedUntappdCredentials.cs create mode 100644 src/Untappd.Net/Client/IUntappdCredentials.cs create mode 100644 src/Untappd.Net/Client/UnAuthenticatedUntappdCredentials.cs create mode 100644 src/Untappd.Net/Properties/AssemblyInfo.cs create mode 100644 src/Untappd.Net/Request/AuthenticatedRequest.cs create mode 100644 src/Untappd.Net/Request/BaseRequest.cs create mode 100644 src/Untappd.Net/Request/Request.cs create mode 100644 src/Untappd.Net/Responses/BeerInfo.cs create mode 100644 src/Untappd.Net/Responses/BeerSearch.cs create mode 100644 src/Untappd.Net/Responses/BreweryInfo.cs create mode 100644 src/Untappd.Net/Responses/BrewerySearch.cs create mode 100644 src/Untappd.Net/Responses/UserBadges.cs create mode 100644 src/Untappd.Net/Responses/UserDistinctBeer.cs create mode 100644 src/Untappd.Net/Responses/UserFriends.cs create mode 100644 src/Untappd.Net/Responses/UserInfo.cs create mode 100644 src/Untappd.Net/Responses/UserWishlist.cs create mode 100644 src/Untappd.Net/Responses/VenueInfo.cs create mode 100644 src/Untappd.Net/Untappd.Net.csproj create mode 100644 src/Untappd.Net/packages.config diff --git a/Untappd.Net.sln b/Untappd.Net.sln new file mode 100644 index 0000000..1f0493d --- /dev/null +++ b/Untappd.Net.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22609.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Untappd.Net", "src\Untappd.Net\Untappd.Net.csproj", "{D8571A44-2E86-43A3-B64A-2364614C6934}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Untappd.Net.UnitTests", "src\Untappd.Net.UnitTests\Untappd.Net.UnitTests.csproj", "{513A3FB2-6664-40E7-A03E-591D852C42E4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8571A44-2E86-43A3-B64A-2364614C6934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8571A44-2E86-43A3-B64A-2364614C6934}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8571A44-2E86-43A3-B64A-2364614C6934}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8571A44-2E86-43A3-B64A-2364614C6934}.Release|Any CPU.Build.0 = Release|Any CPU + {513A3FB2-6664-40E7-A03E-591D852C42E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {513A3FB2-6664-40E7-A03E-591D852C42E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {513A3FB2-6664-40E7-A03E-591D852C42E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {513A3FB2-6664-40E7-A03E-591D852C42E4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Untappd.Net.UnitTests/Class1.cs b/src/Untappd.Net.UnitTests/Class1.cs new file mode 100644 index 0000000..df03d9f --- /dev/null +++ b/src/Untappd.Net.UnitTests/Class1.cs @@ -0,0 +1,23 @@ +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Client.Net; +using Untappd.Net.Responses.UserInfo; + +namespace Untappd.Net.UnitTests +{ + [TestFixture] + public class Class1 + { + [Test] + public void Test() + { + + //var t = new Request.Request().Get(ts, "tparnell"); + //Console.WriteLine(t.response.user.first_name); + } + } +} diff --git a/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs b/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..743012e --- /dev/null +++ b/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Untappd.Net.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Untappd.Net.UnitTests")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("513a3fb2-6664-40e7-a03e-591d852c42e4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Untappd.Net.UnitTests/Untappd.Net.UnitTests.csproj b/src/Untappd.Net.UnitTests/Untappd.Net.UnitTests.csproj new file mode 100644 index 0000000..50d666e --- /dev/null +++ b/src/Untappd.Net.UnitTests/Untappd.Net.UnitTests.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {513A3FB2-6664-40E7-A03E-591D852C42E4} + Library + Properties + Untappd.Net.UnitTests + Untappd.Net.UnitTests + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\NUnitTestAdapter.1.2\lib\nunit.core.dll + False + + + ..\..\packages\NUnitTestAdapter.1.2\lib\nunit.core.interfaces.dll + False + + + ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + ..\..\packages\NUnitTestAdapter.1.2\lib\nunit.util.dll + False + + + ..\..\packages\NUnitTestAdapter.1.2\lib\NUnit.VisualStudio.TestAdapter.dll + False + + + + + + + + + + + + + + + + + + + {d8571a44-2e86-43a3-b64a-2364614c6934} + Untappd.Net + + + + + + + + \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/packages.config b/src/Untappd.Net.UnitTests/packages.config new file mode 100644 index 0000000..1e5dba5 --- /dev/null +++ b/src/Untappd.Net.UnitTests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/Untappd.Net/Client/AuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Client/AuthenticatedUntappdCredentials.cs new file mode 100644 index 0000000..52f6180 --- /dev/null +++ b/src/Untappd.Net/Client/AuthenticatedUntappdCredentials.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Client.Net; + +namespace Untappd.Net.Client +{ + public class AuthenticatedUntappdCredentials : UnAuthenticatedUntappdCredentials + { + internal string AccessToken { get; private set; } + /// + /// Pass your authenticated access token + /// + /// + /// + /// + public AuthenticatedUntappdCredentials(string accessToken, string clientId, string clientSecret) + :base(clientId, clientSecret) + { + if (string.IsNullOrWhiteSpace(accessToken)) throw new ArgumentNullException("accessToken"); + AccessToken = string.Copy(accessToken); + } + } +} diff --git a/src/Untappd.Net/Client/IUntappdCredentials.cs b/src/Untappd.Net/Client/IUntappdCredentials.cs new file mode 100644 index 0000000..b23fe36 --- /dev/null +++ b/src/Untappd.Net/Client/IUntappdCredentials.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Untappd.Net.Client +{ + public interface IUntappdCredentials + { + string ClientId { get; } + string ClientSecret { get; } + } +} diff --git a/src/Untappd.Net/Client/UnAuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Client/UnAuthenticatedUntappdCredentials.cs new file mode 100644 index 0000000..7d308cb --- /dev/null +++ b/src/Untappd.Net/Client/UnAuthenticatedUntappdCredentials.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Client; + +namespace Untappd.Client.Net +{ + public class UnAuthenticatedUntappdCredentials : IUntappdCredentials + { + public string ClientId { get; private set; } + public string ClientSecret { get; private set; } + + /// + /// UnAuthenticated request. Pass your API id and secret + /// + /// + /// + public UnAuthenticatedUntappdCredentials(string clientId, string clientSecret) + { + if (string.IsNullOrWhiteSpace(clientId)) + { + throw new ArgumentNullException("clientId"); + } + if (string.IsNullOrWhiteSpace(clientSecret)) + { + throw new ArgumentNullException("clientSecret"); + } + ClientId = string.Copy(clientId); + ClientSecret = string.Copy(clientSecret); + } + } +} diff --git a/src/Untappd.Net/Properties/AssemblyInfo.cs b/src/Untappd.Net/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f60b30f --- /dev/null +++ b/src/Untappd.Net/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Untappd.Net")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Untappd.Net")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d8571a44-2e86-43a3-b64a-2364614c6934")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Untappd.Net/Request/AuthenticatedRequest.cs b/src/Untappd.Net/Request/AuthenticatedRequest.cs new file mode 100644 index 0000000..dc0bd0a --- /dev/null +++ b/src/Untappd.Net/Request/AuthenticatedRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Untappd.Net.Request +{ + public abstract class AuthenticatedRequest : BaseRequest + { + protected override abstract string _EndPoint { get; } + } +} diff --git a/src/Untappd.Net/Request/BaseRequest.cs b/src/Untappd.Net/Request/BaseRequest.cs new file mode 100644 index 0000000..88ae8e6 --- /dev/null +++ b/src/Untappd.Net/Request/BaseRequest.cs @@ -0,0 +1,24 @@ +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; } + /// + /// Pass in the parameter into the request...ie username, brewery, etc. + /// + /// + /// + internal string EndPoint(string parameter) + { + return string.Format(_EndPoint, parameter); + } + + } +} diff --git a/src/Untappd.Net/Request/Request.cs b/src/Untappd.Net/Request/Request.cs new file mode 100644 index 0000000..fb776f1 --- /dev/null +++ b/src/Untappd.Net/Request/Request.cs @@ -0,0 +1,38 @@ +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 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(resp.Content); + return jsonresult; + + } + + public TResult GetAuth() + where T : AuthenticatedUntappdCredentials + where TResult : BaseRequest, new() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Untappd.Net/Responses/BeerInfo.cs b/src/Untappd.Net/Responses/BeerInfo.cs new file mode 100644 index 0000000..639f1b3 --- /dev/null +++ b/src/Untappd.Net/Responses/BeerInfo.cs @@ -0,0 +1,299 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.BeerInfo +{ + + public class BeerInfoRootobject : BaseRequest + { + public Beer beer { get; set; } + + protected override string _EndPoint { get { return "v4/beer/info/{0}"; } } + } + + 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_description { get; set; } + public string beer_style { get; set; } + public int is_in_production { get; set; } + public string beer_slug { get; set; } + public int is_homebrew { get; set; } + public string created_at { get; set; } + public int rating_count { get; set; } + public float rating_score { get; set; } + public Stats stats { get; set; } + public Brewery brewery { get; set; } + public int auth_rating { get; set; } + public bool wish_list { get; set; } + public Media media { get; set; } + public Similar similar { get; set; } + public Friends1 friends { get; set; } + public Vintages vintages { get; set; } + } + + public class Stats + { + public int total_count { get; set; } + public int monthly_count { get; set; } + public int total_user_count { get; set; } + public int user_count { get; set; } + } + + public class Brewery + { + public int brewery_id { get; set; } + public string brewery_name { 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 class Contact + { + public string twitter { get; set; } + public string facebook { 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; } + } + + 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 Beer1 beer { get; set; } + public Brewery1 brewery { get; set; } + public User user { get; set; } + public Venue[] venue { 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 Beer1 + { + 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 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 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 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; } + } + + 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; } + } + + public class Venue + { + 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 Categories categories { get; set; } + public Location2 location { get; set; } + public Contact2 contact { get; set; } + public bool private_venue { get; set; } + public Foursquare foursquare { get; set; } + public Venue_Icon venue_icon { get; set; } + } + + public class Categories + { + public int count { get; set; } + public Item[] items { get; set; } + } + + public class Item + { + public string category_name { get; set; } + public string category_id { get; set; } + public bool is_primary { get; set; } + } + + public class Location2 + { + public string venue_address { get; set; } + public string venue_city { get; set; } + public string venue_state { get; set; } + public float lat { get; set; } + public float lng { get; set; } + } + + public class Contact2 + { + public string twitter { get; set; } + public string venue_url { get; set; } + } + + public class Foursquare + { + public string foursquare_id { get; set; } + public string foursquare_url { get; set; } + } + + public class Venue_Icon + { + public string sm { get; set; } + public string md { get; set; } + public string lg { get; set; } + } + + public class Similar + { + public int count { get; set; } + public Items1 items { get; set; } + } + + public class Items1 + { + public float rating_score { get; set; } + public Beer2 beer { get; set; } + public Brewery2 brewery { get; set; } + public Friends friends { get; set; } + } + + public class Beer2 + { + public int bid { get; set; } + public string beer_name { get; set; } + public float beer_abv { get; set; } + public int beer_ibu { get; set; } + public string beer_style { get; set; } + public string beer_label { get; set; } + public int auth_rating { get; set; } + public bool wish_list { get; set; } + } + + public class Brewery2 + { + 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 instagram { get; set; } + public string url { 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; } + } + + public class Friends + { + public object[] items { get; set; } + public int count { get; set; } + } + + public class Friends1 + { + public int count { get; set; } + public object[] items { get; set; } + } + + public class Vintages + { + public int count { get; set; } + public Item1[] items { get; set; } + } + + public class Item1 + { + public Beer3 beer { get; set; } + } + + public class Beer3 + { + public int bid { get; set; } + public string beer_label { get; set; } + public string beer_slug { get; set; } + public string beer_name { get; set; } + public int is_vintage { get; set; } + public int is_variant { get; set; } + } + +} diff --git a/src/Untappd.Net/Responses/BeerSearch.cs b/src/Untappd.Net/Responses/BeerSearch.cs new file mode 100644 index 0000000..0829fcd --- /dev/null +++ b/src/Untappd.Net/Responses/BeerSearch.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.BeerSearch +{ + + public class BeerSearchRootobject : BaseRequest + { + 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; } + } + + public class Beers + { + public int count { get; set; } + public Items items { get; set; } + } + + public class Items + { + 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; } + } + + 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; } + } + + 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; } + } + + public class Homebrew + { + public int count { get; set; } + public Items1 items { get; set; } + } + + public class Items1 + { + 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; } + } + + 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_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 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 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 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; } + } + + public class Breweries + { + public int count { get; set; } + public Items2 items { get; set; } + } + + public class Items2 + { + public Brewery2 brewery { 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; } + } + + 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; } + } + +} diff --git a/src/Untappd.Net/Responses/BreweryInfo.cs b/src/Untappd.Net/Responses/BreweryInfo.cs new file mode 100644 index 0000000..5fb3060 --- /dev/null +++ b/src/Untappd.Net/Responses/BreweryInfo.cs @@ -0,0 +1,230 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.BreweryInfo +{ + + public class BreweryInfoRootobject : BaseRequest + { + protected override string _EndPoint { get { return "v4/brewery/info/{0}"; } } + public Brewery brewery { 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 int brewery_in_production { get; set; } + public int is_independent { get; set; } + public Claimed_Status claimed_status { get; set; } + public int beer_count { get; set; } + public Contact contact { get; set; } + public string brewery_type { get; set; } + public int brewery_type_id { get; set; } + public Location location { get; set; } + public Rating rating { get; set; } + public string brewery_description { get; set; } + public Stats stats { get; set; } + public Owners owners { get; set; } + public Media media { get; set; } + public Beer_List beer_list { get; set; } + } + + public class Claimed_Status + { + public bool is_claimed { get; set; } + public string claimed_slug { get; set; } + public bool follow_status { get; set; } + public int follower_count { get; set; } + public int uid { get; set; } + public string mute_status { 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_address { get; set; } + public string brewery_city { get; set; } + public string brewery_state { get; set; } + public float brewery_lat { get; set; } + public float brewery_lng { get; set; } + } + + public class Rating + { + public int count { get; set; } + public float rating_score { get; set; } + } + + public class Stats + { + public int total_count { get; set; } + public int unique_count { get; set; } + public int monthly_count { get; set; } + public int weekly_count { get; set; } + public int user_count { get; set; } + public float age_on_service { get; set; } + } + + public class Owners + { + public int count { get; set; } + public object[] items { 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 Brewery1 brewery { get; set; } + public User user { get; set; } + public object[] venue { 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 float beer_abv { get; set; } + public string beer_label { get; set; } + public string beer_style { get; set; } + public int auth_rating { get; set; } + public bool wish_list { 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 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 instagram { 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; } + } + + 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; } + } + + public class Beer_List + { + public bool is_super { get; set; } + public string sort { get; set; } + public string filter { get; set; } + public int count { get; set; } + public Items1 items { get; set; } + public int beer_count { get; set; } + } + + public class Items1 + { + public bool has_had { get; set; } + public int total_count { get; set; } + public Beer1 beer { get; set; } + public Brewery2 brewery { get; set; } + public object[] friends { get; set; } + } + + public class Beer1 + { + public int bid { get; set; } + public string beer_name { get; set; } + public string beer_label { get; set; } + public string beer_style { 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 created_at { get; set; } + public int auth_rating { get; set; } + public bool wish_list { get; set; } + public float rating_score { get; set; } + public int rating_count { get; set; } + } + + public class Brewery2 + { + 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 Contact2 contact { get; set; } + public Location2 location { get; set; } + public int brewery_active { get; set; } + } + + 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 Location2 + { + public string brewery_city { get; set; } + public string brewery_state { get; set; } + public float lat { get; set; } + public float lng { get; set; } + } + +} diff --git a/src/Untappd.Net/Responses/BrewerySearch.cs b/src/Untappd.Net/Responses/BrewerySearch.cs new file mode 100644 index 0000000..9d7f80f --- /dev/null +++ b/src/Untappd.Net/Responses/BrewerySearch.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.BrewerySearch +{ + + public class BrewerySearchRootobject : BaseRequest + { + public int found { get; set; } + public Brewery brewery { get; set; } + protected override string _EndPoint { get { return "v4/search/beer/{0}"; } } + } + + public class Brewery + { + public int count { get; set; } + public Items items { get; set; } + } + + public class Items + { + 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; } + } + + 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; } + } + +} diff --git a/src/Untappd.Net/Responses/UserBadges.cs b/src/Untappd.Net/Responses/UserBadges.cs new file mode 100644 index 0000000..43fc4e2 --- /dev/null +++ b/src/Untappd.Net/Responses/UserBadges.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.UserBadges +{ + + public class UserBadgesRootobject : BaseRequest + { + 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}"; } } + } + + public class Item + { + 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; } + } + + public class Media + { + public string badge_image_sm { get; set; } + public string badge_image_md { get; set; } + public string badge_image_lg { get; set; } + } + + public class Levels + { + public int count { get; set; } + public Item1[] items { get; set; } + } + + public class Item1 + { + 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; } + } + + public class Media1 + { + public string badge_image_sm { get; set; } + public string badge_image_md { get; set; } + public string badge_image_lg { get; set; } + } + +} diff --git a/src/Untappd.Net/Responses/UserDistinctBeer.cs b/src/Untappd.Net/Responses/UserDistinctBeer.cs new file mode 100644 index 0000000..e6f3fa9 --- /dev/null +++ b/src/Untappd.Net/Responses/UserDistinctBeer.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.UserDistinctBeer +{ + + public class UserDistinctBeerRootobject : BaseRequest + { + public Beers beers { get; set; } + protected override string _EndPoint { get { throw new NotImplementedException(); } } + } + + public class Beers + { + public string sort { get; set; } + public string sort_english { get; set; } + public int count { get; set; } + public Items items { get; set; } + } + + public class Items + { + 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; } + } + + 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; } + } + + 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; } + } + +} diff --git a/src/Untappd.Net/Responses/UserFriends.cs b/src/Untappd.Net/Responses/UserFriends.cs new file mode 100644 index 0000000..6dac2b4 --- /dev/null +++ b/src/Untappd.Net/Responses/UserFriends.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.UserFriends +{ + + public class UserFriendsRootobject : BaseRequest + { + protected override string _EndPoint { get { return "v4/user/friends/{0}"; } } + public int count { get; set; } + public Item[] items { get; set; } + } + + public class Item + { + public string friendship_hash { get; set; } + public string created_at { get; set; } + public User user { get; set; } + public Mutual_Friends mutual_friends { 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; } + } + + public class Mutual_Friends + { + public int count { get; set; } + public object[] items { get; set; } + } + +} diff --git a/src/Untappd.Net/Responses/UserInfo.cs b/src/Untappd.Net/Responses/UserInfo.cs new file mode 100644 index 0000000..22f6a1e --- /dev/null +++ b/src/Untappd.Net/Responses/UserInfo.cs @@ -0,0 +1,474 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.UserInfo +{ + + public class ResponseTime + { + public double time { get; set; } + public string measure { get; set; } + } + + public class InitTime + { + public double time { get; set; } + public string measure { get; set; } + } + + public class Meta + { + public int code { get; set; } + public ResponseTime response_time { get; set; } + public InitTime init_time { get; set; } + } + + public class Stats + { + public int total_badges { get; set; } + public int total_friends { get; set; } + public int total_checkins { get; set; } + public int total_beers { get; set; } + public int total_created_beers { get; set; } + public int total_followings { get; set; } + public int total_photos { get; set; } + } + + public class Beer + { + public int bid { get; set; } + public string beer_name { get; set; } + public string beer_label { get; set; } + public double beer_abv { get; set; } + public string beer_description { get; set; } + public string beer_style { get; set; } + public double auth_rating { get; set; } + public bool wish_list { 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 double lat { get; set; } + public double lng { 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 Item + { + public Beer beer { get; set; } + public Brewery brewery { get; set; } + } + + public class RecentBrews + { + public int count { get; set; } + public List items { get; set; } + } + + public class Contact2 + { + public int foursquare { get; set; } + public string twitter { get; set; } + public int facebook { get; set; } + } + + public class User2 + { + 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 location { get; set; } + public int is_supporter { get; set; } + public string url { get; set; } + public string bio { get; set; } + public object relationship { get; set; } + public string user_avatar { get; set; } + public int is_private { get; set; } + public Contact2 contact { get; set; } + } + + public class Beer2 + { + public int bid { get; set; } + public string beer_name { get; set; } + public string beer_label { get; set; } + public string beer_style { get; set; } + public double beer_abv { get; set; } + public int auth_rating { get; set; } + public bool wish_list { get; set; } + public int beer_active { get; set; } + } + + public class Contact3 + { + public string twitter { get; set; } + public string facebook { get; set; } + public string instagram { get; set; } + public string url { get; set; } + } + + public class Location2 + { + public string brewery_city { get; set; } + public string brewery_state { get; set; } + public double lat { get; set; } + public double lng { get; set; } + } + + public class Brewery2 + { + 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 Location2 location { get; set; } + public int brewery_active { get; set; } + } + + public class Item3 + { + public string category_name { get; set; } + public string category_id { get; set; } + public bool is_primary { get; set; } + } + + public class Categories + { + public int count { get; set; } + public List items { get; set; } + } + + public class Location3 + { + 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 double lat { get; set; } + public double lng { get; set; } + } + + public class Contact4 + { + public string twitter { get; set; } + public string venue_url { get; set; } + } + + public class Foursquare + { + public string foursquare_id { get; set; } + public string foursquare_url { get; set; } + } + + public class VenueIcon + { + public string sm { get; set; } + public string md { get; set; } + public string lg { get; set; } + } + + public class Venue + { + 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 Categories categories { get; set; } + public Location3 location { get; set; } + public Contact4 contact { get; set; } + public bool public_venue { get; set; } + public Foursquare foursquare { get; set; } + public VenueIcon venue_icon { get; set; } + } + + public class Comments + { + public int total_count { get; set; } + public int count { get; set; } + public List items { get; set; } + } + + public class User3 + { + 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 bio { get; set; } + public string location { get; set; } + public string user_avatar { get; set; } + public string user_link { get; set; } + public string account_type { get; set; } + public List brewery_details { get; set; } + } + + public class Item4 + { + public int uid { get; set; } + public User3 user { get; set; } + public int like_id { get; set; } + public bool like_owner { get; set; } + public string created_at { get; set; } + } + + public class Toasts + { + public int total_count { get; set; } + public int count { get; set; } + public object auth_toast { get; set; } + public List items { get; set; } + } + + public class Media + { + public int count { get; set; } + public List items { get; set; } + } + + public class Source + { + public string app_name { get; set; } + public string app_website { get; set; } + } + + public class Badges + { + public int count { get; set; } + public List items { get; set; } + } + + public class Item2 + { + public int checkin_id { get; set; } + public string created_at { get; set; } + public string checkin_comment { get; set; } + public double rating_score { get; set; } + public User2 user { get; set; } + public Beer2 beer { get; set; } + public Brewery2 brewery { get; set; } + public Venue venue { get; set; } + public Comments comments { get; set; } + public Toasts toasts { get; set; } + public Media media { get; set; } + public Source source { get; set; } + public Badges badges { get; set; } + } + + public class Checkins + { + public int count { get; set; } + public List items { 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 User4 + { + public int uid { get; set; } + public string user_name { get; set; } + public string location { get; set; } + public string bio { get; set; } + public string first_name { get; set; } + public string last_name { get; set; } + public string user_avatar { get; set; } + public string account_type { get; set; } + public string url { get; set; } + } + + public class Beer3 + { + public int bid { get; set; } + public string beer_name { get; set; } + public string beer_label { get; set; } + public double beer_abv { get; set; } + public string beer_style { get; set; } + public string beer_description { get; set; } + public double auth_rating { get; set; } + public bool wish_list { get; set; } + } + + public class Contact5 + { + public string twitter { get; set; } + public string facebook { get; set; } + public string instagram { get; set; } + public string url { get; set; } + } + + public class Location4 + { + public string brewery_city { get; set; } + public string brewery_state { get; set; } + public double lat { get; set; } + public double lng { get; set; } + } + + public class Brewery3 + { + 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 Contact5 contact { get; set; } + public Location4 location { get; set; } + public int brewery_active { get; set; } + } + + public class Item6 + { + public string category_name { get; set; } + public string category_id { get; set; } + public bool is_primary { get; set; } + } + + public class Categories2 + { + public int count { get; set; } + public List items { get; set; } + } + + public class Location5 + { + 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 double lat { get; set; } + public double lng { get; set; } + } + + public class Contact6 + { + public string twitter { get; set; } + public string venue_url { get; set; } + } + + public class Foursquare2 + { + public string foursquare_id { get; set; } + public string foursquare_url { get; set; } + } + + public class VenueIcon2 + { + public string sm { get; set; } + public string md { get; set; } + public string lg { get; set; } + } + + public class Venue2 + { + 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 Categories2 categories { get; set; } + public Location5 location { get; set; } + public Contact6 contact { get; set; } + public bool public_venue { get; set; } + public Foursquare2 foursquare { get; set; } + public VenueIcon2 venue_icon { get; set; } + } + + public class Item5 + { + public int photo_id { get; set; } + public Photo photo { get; set; } + public string created_at { get; set; } + public int checkin_id { get; set; } + public User4 user { get; set; } + public Beer3 beer { get; set; } + public Brewery3 brewery { get; set; } + public Venue2 venue { get; set; } + } + + public class Media2 + { + public int count { get; set; } + public List items { get; set; } + } + + public class Contact7 + { + public int foursquare { get; set; } + public string twitter { get; set; } + public int facebook { get; set; } + } + + public class User + { + public int uid { get; set; } + public int id { 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 user_avatar_hd { get; set; } + public string user_cover_photo { get; set; } + public int user_cover_photo_offset { get; set; } + public int is_private { get; set; } + public string location { get; set; } + public string url { get; set; } + public string bio { get; set; } + public int is_supporter { get; set; } + public object relationship { get; set; } + public string untappd_url { get; set; } + public string account_type { get; set; } + public Stats stats { get; set; } + public RecentBrews recent_brews { get; set; } + public Checkins checkins { get; set; } + public Media2 media { get; set; } + public Contact7 contact { get; set; } + public string date_joined { get; set; } + public List settings { get; set; } + } + + public class Response + { + public User user { get; set; } + } + + public class UserInfoRootobject : BaseRequest + { + protected override string _EndPoint { get { return "v4/user/info/{0}"; } } + public Meta meta { get; set; } + public List notifications { get; set; } + public Response response { get; set; } + } + +} diff --git a/src/Untappd.Net/Responses/UserWishlist.cs b/src/Untappd.Net/Responses/UserWishlist.cs new file mode 100644 index 0000000..3b56960 --- /dev/null +++ b/src/Untappd.Net/Responses/UserWishlist.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.UserWishlist +{ + + public class UserWishlistRootobject : BaseRequest + { + public Beers beers { get; set; } + protected override string _EndPoint { get { throw new NotImplementedException(); } } + } + + public class Beers + { + public int count { get; set; } + public Items items { get; set; } + } + + public class Items + { + public string created_at { get; set; } + public Beer beer { get; set; } + public Brewery brewery { get; set; } + public object[] friends { 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_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; } + } + + 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; } + } + +} diff --git a/src/Untappd.Net/Responses/VenueInfo.cs b/src/Untappd.Net/Responses/VenueInfo.cs new file mode 100644 index 0000000..c9d7e96 --- /dev/null +++ b/src/Untappd.Net/Responses/VenueInfo.cs @@ -0,0 +1,292 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.VenueInfo +{ + + public class VenueInfoRootobject : BaseRequest + { + public Venue venue { get; set; } + protected override string _EndPoint { get { return "v4/venue/info/{0}"; } } + } + + public class Venue + { + 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; } + } + + public class Categories + { + public int count { get; set; } + public Item[] items { get; set; } + } + + public class Item + { + public string category_name { get; set; } + public string category_id { get; set; } + public bool is_primary { 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; } + } + + public class Venue_Icon + { + public string sm { get; set; } + public string md { get; set; } + 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; } + } + + public class Contact + { + public string twitter { get; set; } + public string venue_url { get; set; } + } + + public class Foursquare + { + public string foursquare_id { get; set; } + public string foursquare_url { 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; } + } + + 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; } + } + + 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; } + } + + public class Venue1 + { + 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; } + } + + public class Item1 + { + public string category_name { get; set; } + public string category_id { get; set; } + public bool is_primary { 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; } + } + + public class Contact2 + { + public string twitter { get; set; } + public string venue_url { get; set; } + } + + public class Foursquare1 + { + public string foursquare_id { get; set; } + public string foursquare_url { get; set; } + } + + public class Venue_Icon1 + { + public string sm { get; set; } + public string md { get; set; } + public string lg { get; set; } + } + + public class Top_Beers + { + public int offset { get; set; } + public int limit { get; set; } + public int count { get; set; } + public Items1 items { get; set; } + } + + public class Items1 + { + 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; } + } + + 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; } + } + + 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; } + } + + public class Friends + { + public int count { get; set; } + public object[] items { get; set; } + } + +} diff --git a/src/Untappd.Net/Untappd.Net.csproj b/src/Untappd.Net/Untappd.Net.csproj new file mode 100644 index 0000000..1c64a0d --- /dev/null +++ b/src/Untappd.Net/Untappd.Net.csproj @@ -0,0 +1,78 @@ + + + + + Debug + AnyCPU + {D8571A44-2E86-43A3-B64A-2364614C6934} + Library + Properties + Untappd.Net + Untappd.Net + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll + + + ..\..\packages\RestSharp.105.0.1\lib\net4\RestSharp.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Untappd.Net/packages.config b/src/Untappd.Net/packages.config new file mode 100644 index 0000000..92b5cb9 --- /dev/null +++ b/src/Untappd.Net/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file