reponses double checked
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using Untappd.Net.Client;
|
||||
using Untappd.Net.Request;
|
||||
using UserInfo = Untappd.Net.Responses.UserInfo;
|
||||
using ActivityFeed = Untappd.Net.Responses.Feeds.ActivityFeed;
|
||||
using UserActivityFeed = Untappd.Net.Responses.Feeds.UserActivityFeed;
|
||||
|
||||
namespace Untappd.Net.UnitTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class Class1
|
||||
{
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void Test()
|
||||
{
|
||||
|
||||
var ts = new UnAuthenticatedUntappdCredentials("id", "scrt");
|
||||
var t = new Repository().Get<UserInfo.UserInfo>(ts, "tparnell");
|
||||
Console.WriteLine(t);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void GetActualJsonRequest()
|
||||
{
|
||||
var credentials = new AuthenticatedUntappdCredentials(
|
||||
"",
|
||||
"",
|
||||
"");
|
||||
|
||||
var repo = new Repository();
|
||||
var activityFeed = repo.Get<UserActivityFeed.UserActivityFeed>(credentials);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace Untappd.Net.UnitTests.Request
|
||||
[Test]
|
||||
public void ConfirmRequestWorks()
|
||||
{
|
||||
var mockCreds = new Mock<IUnAuthenticadedUntappdCredentials>();
|
||||
var mockCreds = new Mock<IUnAuthenticatedUntappdCredentials>();
|
||||
mockCreds.Setup(a => a.ClientId).Returns("id");
|
||||
mockCreds.Setup(a => a.ClientSecret).Returns("secret");
|
||||
var bodyParam = new Dictionary<string, string> {{"key", "value"}};
|
||||
|
||||
3068
src/Untappd.Net.UnitTests/Responses/Json/ActivityFeed.json
Normal file
3068
src/Untappd.Net.UnitTests/Responses/Json/ActivityFeed.json
Normal file
File diff suppressed because it is too large
Load Diff
2828
src/Untappd.Net.UnitTests/Responses/Json/BeerInfo.json
Normal file
2828
src/Untappd.Net.UnitTests/Responses/Json/BeerInfo.json
Normal file
File diff suppressed because it is too large
Load Diff
696
src/Untappd.Net.UnitTests/Responses/Json/BeerSearch.json
Normal file
696
src/Untappd.Net.UnitTests/Responses/Json/BeerSearch.json
Normal file
@@ -0,0 +1,696 @@
|
||||
{
|
||||
"meta": {
|
||||
"code": 200,
|
||||
"response_time": {
|
||||
"time": 0.156,
|
||||
"measure": "seconds"
|
||||
},
|
||||
"init_time": {
|
||||
"time": 0.011,
|
||||
"measure": "seconds"
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"type": "notifications",
|
||||
"unread_count": {
|
||||
"comments": 0,
|
||||
"toasts": 0,
|
||||
"friends": 0,
|
||||
"messages": 0,
|
||||
"news": 0
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"message": "",
|
||||
"brewery_id": false,
|
||||
"search_type": "",
|
||||
"type_id": 0,
|
||||
"search_version": 3,
|
||||
"found": 17,
|
||||
"offset": 0,
|
||||
"limit": 25,
|
||||
"term": "BrewDog Paradox",
|
||||
"parsed_term": "brewdog* AND paradox*",
|
||||
"beers": {
|
||||
"count": 17,
|
||||
"items": [
|
||||
{
|
||||
"checkin_count": 4903,
|
||||
"have_had": true,
|
||||
"your_count": 1,
|
||||
"beer": {
|
||||
"bid": 115958,
|
||||
"beer_name": "Paradox Jura",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-115958_0a662_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Scottish Malt Whisky Casks Rock!\n\nTheir ruggedly robust beauty, character, captivating aromas and unique Scottish heritage had us completely spellbound.\n\nThis edition sees our Imperial Stout aged for six months in specially selected Jura casks. This maturation proccess results in the whisky flavours and aromas being infused deep into our beer.\n\nMade in Scotland, Paradox combines BrewDog's craft brewed beer with the finest malt whisky casks. \n\nTo release the true character, complexity and depth of flavours in this beer please enjoy it at room temperature, unless you live in an igloo",
|
||||
"created_at": "Mon, 02 Jan 2012 09:08:25 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 4.5,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 3363,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 294678,
|
||||
"beer_name": "Paradox Isle Of Arran (15%)",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-294678_27df7_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "A rock 'n roll partnership between Scotland's best new distillery (Distiller of the Year 2007) and Scotland's hardcore new microbrewery (Gold MedalWinner, World Beer Cup 2008).\n\nParadox, Isle of Arran Edition, see's BrewDog's killer 15% Imperial Stout matured in stunning whisky casks from the Arran distillery.\n\nThe rich vanilla sweetness, hints of cinnamon and balancing aromatic fruit and ginger flavours of the Arran Malt are all completely infused deep into the texture of our smooth, robust, Imperial Stout.\n\nProfund new depths emerge with each pass and sip, the pallet is as pollished and classic as a Robbie Burns masterpiece, this is Scotland in a glass.",
|
||||
"created_at": "Mon, 14 Jan 2013 03:05:55 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 2296,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 641405,
|
||||
"beer_name": "Paradox Heaven Hill",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-641405_86ad6_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Paradox Heaven Hill is a 15% Imperial Stout aged in American Bourbon Barrels for 12 months. A schizophrenic translatlantic son of a bitch of a beer. Huge, decadent imperial stout clashes in the most beautiful way with the best incarnation of the American Dream since Nixon choked on a cheeseburger. We think this might just be the best Paradox ever.",
|
||||
"created_at": "Mon, 07 Apr 2014 07:28:22 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 1209,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 322584,
|
||||
"beer_name": "Paradox Grain (15%)",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-322584_4e3cf_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "This is the latest release of our awesome Paradox series, where we take our signature 15% imperial stout and mature it in different ways.\n\nParadox Grain has been matured in ex bourbon whisky barrels. Wonderful oak notes complimented by smooth vanilla, rich treacle, stewed fruits and decadent chocolate.\n\nBest enjoyed at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Fri, 08 Mar 2013 04:08:18 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 328,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 976247,
|
||||
"beer_name": "Paradox Compass Box",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-976247_0d90c_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 100,
|
||||
"beer_description": "Paradox Compass Box is the latest of our whisky cask aged imperial stouts to be released from its smoky, shadowy cocoon.\n\nOur huge stout was aged in Compass Box great King Street barrels for 221 days before bottling.\n\nFull bodied, crashing roasty malt flavours are tempered by a rich chocolate character, balanced with light smoke and an extra layer of orange oil complexity.\n\nMalts: Cara, Carafa, Dark Crystal, Extra Pale, Munich\n\nHops: Columbus, First Gold, Saaz",
|
||||
"created_at": "Fri, 13 Feb 2015 12:08:42 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 1,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 1009550,
|
||||
"beer_name": "Paradox Longrow",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/assets\/images\/temp\/badge-beer-default.png",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 0,
|
||||
"beer_description": "Imperial stout aged in a Longrow whiskey cask.",
|
||||
"created_at": "Sat, 14 Mar 2015 01:09:40 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 1
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 2191,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 10557,
|
||||
"beer_name": "Paradox Smokehead",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-10557_c6c7d_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "BrewDog and Smokehead’s enthralling alliance creates a revolutionary beer with all the Atlantic smoke, encapsulating peat and intensity of flavour of an Islay malt Whisky.\n\nServe at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Tue, 23 Nov 2010 07:37:05 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 2046,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 12860,
|
||||
"beer_name": "Paradox Isle of Arran (10%)",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-12860_6dfc7_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "A rock 'n roll partnership between Scotland's best new distillery (Distiller of the Year 2007) and Scotland's hardcore new microbrewery (Gold MedalWinner, World Beer Cup 2008).\n\nParadox, Isle of Arran Edition, see's BrewDog's killer 15% Imperial Stout matured in stunning whisky casks from the Arran distillery.\n\nThe rich vanilla sweetness, hints of cinnamon and balancing aromatic fruit and ginger flavours of the Arran Malt are all completely infused deep into the texture of our smooth, robust, Imperial Stout.\n\nProfund new depths emerge with each pass and sip, the pallet is as pollished and classic as a Robbie Burns masterpiece, this is Scotland in a glass.",
|
||||
"created_at": "Sat, 04 Dec 2010 12:59:06 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 1074,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 267048,
|
||||
"beer_name": "Christmas Paradox 2012",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-267048_0225e_sm.jpeg",
|
||||
"beer_abv": 15,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "This delicious dark beer has been matured for 12 months in rum casks and has all the wonderful flavours of Christmas, roasted chocolate notes infused with cinnamon and vanilla.\nWhen the season of peace on earth can roughly be translated as commercialised hysteria on a tight budget.\nOr the precursor to January's 'new you' is a week spent devouring the equivalent of your own weight with the ferocity of a ravenous reindeer.\nLet this be the year that you choose not to succumb when the lure of conformity is at its strongest. Instead, fight fire with fire by unleashing this paradoxical beer as the antidote to Christmas.\nSimply pour yourself a glass and sit back as the world descends into a temporary fairy light fuelled frenzy.",
|
||||
"created_at": "Thu, 22 Nov 2012 03:52:05 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 772,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 16652,
|
||||
"beer_name": "Paradox Islay",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-ParadoxIslay_16652.jpeg",
|
||||
"beer_abv": 13.8,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "NOTE: ABV varies for this product.\n\nThis Imperial Stout has been matured in specially selected Islay Malt Whisky casks.\n\nThis aging process infuses into the beer all the threatening smoke, the encapsulating peat, the Atlantic essence and raw power of Scotland’s most distinctive Whiskies.",
|
||||
"created_at": "Fri, 24 Dec 2010 11:44:51 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 675,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 26487,
|
||||
"beer_name": "Paradox Port Dundas",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-26487_16e8f_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Port Dundas 1966 We set about to unite two of Scotland proudest heritages and produce a product which combined all that was good about Scotland’s whisky producing history and our contemporary take on a traditional Scottish style of stout.\n\nThe fact that we have developed this product in conjunction with Duncan Taylor Ltd of Huntly means we mature our beer in the casks that once housed some of the most prestigious whiskies available today. The distinct flavours of these whiskies is beautifully infused into the beer giving a unique and unrivalled experience for both beer and whisky lovers.\n\nParadox is produced in very small batches and each batch is bottled in a unique numbered limited edition bottle.",
|
||||
"created_at": "Tue, 25 Jan 2011 05:50:01 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 355,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 15164,
|
||||
"beer_name": "Paradox Macallan",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-15164_0357c_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Scottish Malt Whisky Casks Rock!\n\nTheir ruggedly robust beauty, character, captivating aromas and unique Scottish heritage had us completely spellbound.\n\nThis edition sees our Imperial Stout aged for several months in former 1987 Macallan Sherry casks. This maturation proccess results in the whisky flavours and aromas being infused deep into our beer.\n\nMade in Scotland, Paradox combines BrewDog's craft brewed beer with the finest malt whisky casks. \n\nTo release the true character, complexity and depth of flavours in this beer please enjoy it at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Fri, 17 Dec 2010 10:51:14 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 275,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 48569,
|
||||
"beer_name": "Paradox Glen Grant",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-48569_55b61_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Their ruggedly robust beauty, character, captivating aromas and unique Scottish heritage had us completely spellbound.\n\nThis edition sees our Imperial Stout aged for several months in specially selected whisky casks. This maturation proccess results in the whisky flavours and aromas being infused deep into our beer.\n\nMade in Scotland, Paradox combines BrewDog's craft brewed beer with the finest malt whisky casks. \n\nTo release the true character, complexity and depth of flavours in this beer please enjoy it at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Fri, 06 May 2011 16:52:50 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 275,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 5704,
|
||||
"beer_name": "Paradox Speyside",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-5704_1a389_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Scottish Malt Whisky Casks Rock!\n\nTheir ruggedly robust beauty, character, captivating aromas and unique Scottish heritage had us completely spellbound.\n\nThis edition sees our Imperial Stout aged for six months in specially selected Speyside casks. This maturation proccess results in the whisky flavours and aromas being infused deep into our beer.\n\nMade in Scotland, Paradox combines BrewDog's craft brewed beer with the finest malt whisky casks. \n\nTo release the true character, complexity and depth of flavours in this beer please enjoy it at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Sat, 21 Aug 2010 07:26:35 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 256,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 24867,
|
||||
"beer_name": "Paradox Springbank",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-24867_dde2f_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Scottish Malt Whisky Casks Rock!\n\nTheir ruggedly robust beauty, character, captivating aromas and unique Scottish heritage had us completely spellbound.\n\nThis edition sees our Imperial Stout aged for six months in specially selected Springbank casks. This maturation proccess results in the whisky flavours and aromas being infused deep into our beer.\n\nMade in Scotland, Paradox combines BrewDog's craft brewed beer with the finest malt whisky casks. \n\nTo release the true character, complexity and depth of flavours in this beer please enjoy it at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Sun, 16 Jan 2011 23:10:40 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 29,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 89888,
|
||||
"beer_name": "Paradox Grain (10%)",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/beer_logos\/beer-89888_5bbaf_sm.jpeg",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 70,
|
||||
"beer_description": "Paradox Grain has been matured in ex bourbon whisky barrels. Wonderful oak notes complimented by smooth vanilla, rich treacle, stewed fruits and decadent chocolate.\n\nBest enjoyed at room temperature, unless you live in an igloo.",
|
||||
"created_at": "Thu, 20 Oct 2011 12:01:54 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"checkin_count": 3,
|
||||
"have_had": false,
|
||||
"your_count": 0,
|
||||
"beer": {
|
||||
"bid": 982717,
|
||||
"beer_name": "Paradox Islay 1968 Anniversary Edition",
|
||||
"beer_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/assets\/images\/temp\/badge-beer-default.png",
|
||||
"beer_abv": 10,
|
||||
"beer_ibu": 0,
|
||||
"beer_description": "BrewDog 1st Anniversary beer. Bottled on the 28th April 2008. Only 200 bottles were produced.\n\nThis was the first batch of beer that BrewDog ever made, it was aged for 12 months in a single Bowmore 1968 cask. It comes with a specially designed and hand printed label, by Johanna Basford. \n\nDesigner Johanna Basford thinks, \"each bottle is a little work of art in its own right\". Enjoy yours.",
|
||||
"created_at": "Wed, 18 Feb 2015 17:56:40 +0000",
|
||||
"beer_style": "American Imperial \/ Double Stout",
|
||||
"auth_rating": 0,
|
||||
"wish_list": false,
|
||||
"in_production": 0
|
||||
},
|
||||
"brewery": {
|
||||
"brewery_id": 241,
|
||||
"brewery_name": "BrewDog",
|
||||
"brewery_slug": "brewdog",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-241_8c584.jpeg",
|
||||
"country_name": "Scotland",
|
||||
"contact": {
|
||||
"twitter": "BrewDog",
|
||||
"facebook": "http:\/\/www.facebook.com\/pages\/BrewDog\/21251598643",
|
||||
"instagram": "brewdogofficial",
|
||||
"url": "http:\/\/www.brewdog.com"
|
||||
},
|
||||
"location": {
|
||||
"brewery_city": "Ellon",
|
||||
"brewery_state": "Aberdeenshire, AB41 8BX",
|
||||
"lat": 57.3716,
|
||||
"lng": -2.04834
|
||||
},
|
||||
"brewery_active": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"homebrew": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
},
|
||||
"breweries": {
|
||||
"items": [
|
||||
],
|
||||
"count": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
3437
src/Untappd.Net.UnitTests/Responses/Json/BreweryInfo.json
Normal file
3437
src/Untappd.Net.UnitTests/Responses/Json/BreweryInfo.json
Normal file
File diff suppressed because it is too large
Load Diff
65
src/Untappd.Net.UnitTests/Responses/Json/BrewerySearch.json
Normal file
65
src/Untappd.Net.UnitTests/Responses/Json/BrewerySearch.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"meta": {
|
||||
"code": 200,
|
||||
"response_time": {
|
||||
"time": 0.037,
|
||||
"measure": "seconds"
|
||||
},
|
||||
"init_time": {
|
||||
"time": 0.012,
|
||||
"measure": "seconds"
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"type": "notifications",
|
||||
"unread_count": {
|
||||
"comments": 0,
|
||||
"toasts": 0,
|
||||
"friends": 0,
|
||||
"messages": 0,
|
||||
"news": 0
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"search_type": "wildcard",
|
||||
"sort": "",
|
||||
"term": "wild rose",
|
||||
"key": "wild* AND rose*",
|
||||
"found": 2,
|
||||
"brewery": {
|
||||
"count": 2,
|
||||
"items": [
|
||||
{
|
||||
"brewery": {
|
||||
"brewery_id": 4885,
|
||||
"beer_count": 161,
|
||||
"brewery_name": "Wild Rose Brewery (Canada)",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-WildRoseBrewery_4885.jpeg",
|
||||
"country_name": "Canada",
|
||||
"location": {
|
||||
"brewery_city": "",
|
||||
"brewery_state": "",
|
||||
"lat": 0,
|
||||
"lng": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"brewery": {
|
||||
"brewery_id": 15072,
|
||||
"beer_count": 4,
|
||||
"brewery_name": "Wilde Rose Bräukeller",
|
||||
"brewery_label": "https:\/\/d1c8v1qci5en44.cloudfront.net\/site\/brewery_logos\/brewery-WildeRoseBrauKeller_15072.jpeg",
|
||||
"country_name": "Germany",
|
||||
"location": {
|
||||
"brewery_city": "",
|
||||
"brewery_state": "",
|
||||
"lat": 0,
|
||||
"lng": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
3658
src/Untappd.Net.UnitTests/Responses/Json/UserActivityFeed.json
Normal file
3658
src/Untappd.Net.UnitTests/Responses/Json/UserActivityFeed.json
Normal file
File diff suppressed because it is too large
Load Diff
2052
src/Untappd.Net.UnitTests/Responses/Json/UserBadges.json
Normal file
2052
src/Untappd.Net.UnitTests/Responses/Json/UserBadges.json
Normal file
File diff suppressed because it is too large
Load Diff
1158
src/Untappd.Net.UnitTests/Responses/Json/UserDistinctBeers.json
Normal file
1158
src/Untappd.Net.UnitTests/Responses/Json/UserDistinctBeers.json
Normal file
File diff suppressed because it is too large
Load Diff
528
src/Untappd.Net.UnitTests/Responses/Json/UserFriends.json
Normal file
528
src/Untappd.Net.UnitTests/Responses/Json/UserFriends.json
Normal file
@@ -0,0 +1,528 @@
|
||||
{
|
||||
"meta": {
|
||||
"code": 200,
|
||||
"response_time": {
|
||||
"time": 0.017,
|
||||
"measure": "seconds"
|
||||
},
|
||||
"init_time": {
|
||||
"time": 0.011,
|
||||
"measure": "seconds"
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"type": "notifications",
|
||||
"unread_count": {
|
||||
"comments": 0,
|
||||
"toasts": 0,
|
||||
"friends": 0,
|
||||
"messages": 0,
|
||||
"news": 0
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"count": 25,
|
||||
"items": [
|
||||
{
|
||||
"friendship_hash": "0e4febd2a0c35a63abe5e0e3ce00a282",
|
||||
"created_at": "Tue, 21 Apr 2015 23:19:30 +0000",
|
||||
"user": {
|
||||
"uid": 2089631,
|
||||
"user_name": "tparnell",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Tommy",
|
||||
"last_name": "Parnell",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/333e3cea32cd17ff2007d131df336061?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "f215a9cb6ea4185b4efe00b32ed892b7",
|
||||
"created_at": "Thu, 16 Apr 2015 15:17:47 +0000",
|
||||
"user": {
|
||||
"uid": 2173683,
|
||||
"user_name": "brubscosta",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Bruna",
|
||||
"last_name": "Costa",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/51e4c046b4818381011d7578e9fe131d_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "e0a0b02346835783e67b1556dbe0dbff",
|
||||
"created_at": "Mon, 30 Mar 2015 01:11:21 +0000",
|
||||
"user": {
|
||||
"uid": 63642,
|
||||
"user_name": "Drebrazil",
|
||||
"location": "Curitiba",
|
||||
"bio": "",
|
||||
"is_supporter": 1,
|
||||
"first_name": "Andre",
|
||||
"last_name": "CuritibaBeer",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/138d78a1fd59dfb6e1213002ade30ccc_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "07cef68b2ac3e98946d67e6a1eecc646",
|
||||
"created_at": "Sat, 14 Mar 2015 01:01:32 +0000",
|
||||
"user": {
|
||||
"uid": 29606,
|
||||
"user_name": "whatchrisdrinks",
|
||||
"location": "Calgary, AB",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Chris",
|
||||
"last_name": "vdP",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/74bf8175e617100e0083a3a0de519f0d_thumb.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "35e2d64ff686e339770ffb19fcea3a9d",
|
||||
"created_at": "Fri, 20 Feb 2015 21:33:55 +0000",
|
||||
"user": {
|
||||
"uid": 431214,
|
||||
"user_name": "eaglecreekbeercompany",
|
||||
"location": "Indianapolis, Indiana",
|
||||
"bio": "Drink some great Beer from the heart of Discover Eagle Creek! Brewed Local! Drank by the people! ",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Eagle Creek Beer Company",
|
||||
"last_name": "",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/fa82acf8935b866c2e21b94542a4deee_thumb.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "9f669419e0f65f86680ffbb60fd4a63b",
|
||||
"created_at": "Fri, 23 Jan 2015 18:18:47 +0000",
|
||||
"user": {
|
||||
"uid": 1954943,
|
||||
"user_name": "eisfeld",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Guilherme",
|
||||
"last_name": "Eisfeld",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/cd6cd40a907ac06ebb1ddf16be51b1c8_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "87e1381ca68cb7251d5fcf5083f0e4c4",
|
||||
"created_at": "Tue, 06 Jan 2015 23:49:30 +0000",
|
||||
"user": {
|
||||
"uid": 217409,
|
||||
"user_name": "amrf",
|
||||
"location": "Brazil - PR",
|
||||
"bio": "Paraná - Brasil\nInstagram: amrfcwb",
|
||||
"is_supporter": 1,
|
||||
"first_name": "Antonio",
|
||||
"last_name": "MR",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/3ff610ed8593b2ed9c57e9c666f80cb5_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "5caabbf050fd7b9b4e8f419a4c3022f4",
|
||||
"created_at": "Thu, 18 Dec 2014 02:59:51 +0000",
|
||||
"user": {
|
||||
"uid": 691788,
|
||||
"user_name": "elpetrucio",
|
||||
"location": "Salvador",
|
||||
"bio": "I'm a beerhunter...",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Elton",
|
||||
"last_name": "Petrucio",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/b7741e13e2bfbaef6c792435f4137958_thumb.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "419dff67fee7c65027b1e448a36873c6",
|
||||
"created_at": "Sun, 16 Nov 2014 03:57:30 +0000",
|
||||
"user": {
|
||||
"uid": 1080006,
|
||||
"user_name": "adamfehr",
|
||||
"location": "Calgary ",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Adam",
|
||||
"last_name": "Fehr",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/0ccbafda3ade6c0d1bd08f4b9466bb37_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "e4b592a6dd6942e852e2b6e214f10610",
|
||||
"created_at": "Sun, 16 Nov 2014 03:57:01 +0000",
|
||||
"user": {
|
||||
"uid": 1353946,
|
||||
"user_name": "RobBarchard",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Robert",
|
||||
"last_name": "Barchard",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/0e0a7bb5207347c18147d9e058c3fd14_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "37ad73ff9728ede836d7aced68d6e04f",
|
||||
"created_at": "Mon, 15 Sep 2014 03:18:56 +0000",
|
||||
"user": {
|
||||
"uid": 1586791,
|
||||
"user_name": "carlos_joia",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Carlos",
|
||||
"last_name": "Joia",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/8c322eb8d416bef6a373131b3e082d78_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "896ae278f2d35d4d61de6312479f9fd6",
|
||||
"created_at": "Sat, 06 Sep 2014 14:04:21 +0000",
|
||||
"user": {
|
||||
"uid": 1351487,
|
||||
"user_name": "murilolz",
|
||||
"location": "Foz Do Iguassú, Parana, Brazil",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Murilo",
|
||||
"last_name": "Senger",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/dfcaef7b4bca1563cb681b9fab5b9a61?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "5baa27e028a6207f106c36ebc423a613",
|
||||
"created_at": "Sat, 06 Sep 2014 14:04:18 +0000",
|
||||
"user": {
|
||||
"uid": 1276090,
|
||||
"user_name": "ValterSantos",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Valter",
|
||||
"last_name": "Santos",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/79b4fa858328f2eb85dff817d79a66a7_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "04fa0d1bc353527af7289dacd4f994f7",
|
||||
"created_at": "Mon, 18 Aug 2014 12:55:11 +0000",
|
||||
"user": {
|
||||
"uid": 1522756,
|
||||
"user_name": "gblecci",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Gilberto",
|
||||
"last_name": "Lecci",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/81037285df438cc76a39f43419f86e23_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "e92bf7ae787cae3e1fa05a153e41bd4d",
|
||||
"created_at": "Thu, 14 Aug 2014 19:26:55 +0000",
|
||||
"user": {
|
||||
"uid": 1511987,
|
||||
"user_name": "Seibt",
|
||||
"location": "Curitiba",
|
||||
"bio": "... A fucking drunk!",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Junior",
|
||||
"last_name": "Seibt",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/7f5e7c4244ded648df508b361341b84d_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "07036b6641559b5a5d6de64654217dc1",
|
||||
"created_at": "Tue, 20 May 2014 10:12:07 +0000",
|
||||
"user": {
|
||||
"uid": 4489,
|
||||
"user_name": "pebianchi",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Pedro",
|
||||
"last_name": "Bianchi",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/dc01aaf8c57bcca2a7789e2a316e01c2?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "4934856a878e2053475b6a1a2742eb9a",
|
||||
"created_at": "Tue, 20 May 2014 10:10:58 +0000",
|
||||
"user": {
|
||||
"uid": 1296745,
|
||||
"user_name": "guilhermeovo",
|
||||
"location": "Curitiba",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Guilherme",
|
||||
"last_name": "Silva",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/68c5685daf11616d17943cce4c151b42?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "71e7eaa9e39df69d61119499a5dd90a4",
|
||||
"created_at": "Thu, 01 May 2014 19:44:16 +0000",
|
||||
"user": {
|
||||
"uid": 273146,
|
||||
"user_name": "ZeAmaral",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "José Carlos",
|
||||
"last_name": "Amaral",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/99969331a083053eec91d884f6a6228e_thumb.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "657f18515d5e45e6b8e35d2f0c133bea",
|
||||
"created_at": "Thu, 24 Apr 2014 06:55:34 +0000",
|
||||
"user": {
|
||||
"uid": 835807,
|
||||
"user_name": "Wogaiht",
|
||||
"location": "Foz do Iguaçu",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Thiago",
|
||||
"last_name": "Wenzel",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/e498e3b0db8ac79a31657f25265754cc_thumb.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "55df2c06656698cc5174f081992fe147",
|
||||
"created_at": "Mon, 21 Apr 2014 21:14:39 +0000",
|
||||
"user": {
|
||||
"uid": 1229549,
|
||||
"user_name": "Oicram",
|
||||
"location": "Rio de Janeiro",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Marcio",
|
||||
"last_name": "Lima",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/985629b701a2e9f5f9704f667728d9e6_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "9ed7772ec96282a4a9c68569e14d20b5",
|
||||
"created_at": "Sat, 05 Apr 2014 17:51:02 +0000",
|
||||
"user": {
|
||||
"uid": 1191592,
|
||||
"user_name": "renke",
|
||||
"location": "Curitiba ",
|
||||
"bio": "Já é a saideira",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Robson",
|
||||
"last_name": "Enke",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/5b5afa5b190abf9d6b469bc981218a70_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "6aac8de6a282ed2f0839d84d3a83921c",
|
||||
"created_at": "Thu, 03 Apr 2014 11:06:03 +0000",
|
||||
"user": {
|
||||
"uid": 1184056,
|
||||
"user_name": "BrumD",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Bruno",
|
||||
"last_name": "Damian",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/c2193fca299858069730994a4253baef?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "876eb6cc212e2c49049ac2e5727e4296",
|
||||
"created_at": "Sat, 29 Mar 2014 16:43:31 +0000",
|
||||
"user": {
|
||||
"uid": 1175027,
|
||||
"user_name": "Francampos",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Francinete",
|
||||
"last_name": "Campos",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/9b1617647ed644328159780feef36dcb?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "50321a982bee71d136738b518e0431fb",
|
||||
"created_at": "Sat, 29 Mar 2014 16:29:45 +0000",
|
||||
"user": {
|
||||
"uid": 1174974,
|
||||
"user_name": "anderbarison",
|
||||
"location": "",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Andersson",
|
||||
"last_name": "Barison",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/gravatar.com\/avatar\/b780615fbd4e2ab86db87e19a4aa6d58?size=100&d=https%3A%2F%2Fd1c8v1qci5en44.cloudfront.net%2Fsite%2Fassets%2Fimages%2Fdefault_avatar_v2.jpg%3Fv%3D1"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"friendship_hash": "cb87bb2960774c906fe014539b6b5a7c",
|
||||
"created_at": "Wed, 26 Mar 2014 10:49:48 +0000",
|
||||
"user": {
|
||||
"uid": 1166219,
|
||||
"user_name": "augustaschmidt",
|
||||
"location": "Calgary ",
|
||||
"bio": "",
|
||||
"is_supporter": 0,
|
||||
"first_name": "Augusta",
|
||||
"last_name": "Schmidt",
|
||||
"relationship": "friends",
|
||||
"user_avatar": "https:\/\/d1c8v1qci5en44.cloudfront.net\/profile\/faedd390ef54d503779d3fa8f925734e_100x100.jpg"
|
||||
},
|
||||
"mutual_friends": {
|
||||
"count": 0,
|
||||
"items": [
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2733
src/Untappd.Net.UnitTests/Responses/Json/UserInfo.json
Normal file
2733
src/Untappd.Net.UnitTests/Responses/Json/UserInfo.json
Normal file
File diff suppressed because it is too large
Load Diff
1058
src/Untappd.Net.UnitTests/Responses/Json/UserWishList.json
Normal file
1058
src/Untappd.Net.UnitTests/Responses/Json/UserWishList.json
Normal file
File diff suppressed because it is too large
Load Diff
5880
src/Untappd.Net.UnitTests/Responses/Json/VenueInfo.json
Normal file
5880
src/Untappd.Net.UnitTests/Responses/Json/VenueInfo.json
Normal file
File diff suppressed because it is too large
Load Diff
129
src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs
Normal file
129
src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs
Normal file
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Untappd.Net.Client;
|
||||
using Untappd.Net.Request;
|
||||
using Newtonsoft.Json;
|
||||
using UserInfo = Untappd.Net.Responses.UserInfo;
|
||||
using ActivityFeed = Untappd.Net.Responses.Feeds.ActivityFeed;
|
||||
using UserActivityFeed = Untappd.Net.Responses.Feeds.UserActivityFeed;
|
||||
using UserBadges = Untappd.Net.Responses.UserBadges;
|
||||
using BeerInfo = Untappd.Net.Responses.BeerInfo;
|
||||
using BeerSearch = Untappd.Net.Responses.BeerSearch;
|
||||
using BreweryInfo = Untappd.Net.Responses.BreweryInfo;
|
||||
using BrewerySearch = Untappd.Net.Responses.BrewerySearch;
|
||||
using UserDistinctBeers = Untappd.Net.Responses.UserDistinctBeer;
|
||||
using UserFriends = Untappd.Net.Responses.UserFriends;
|
||||
using UserWishList = Untappd.Net.Responses.UserWishlist;
|
||||
using VenueInfo = Untappd.Net.Responses.VenueInfo;
|
||||
|
||||
namespace Untappd.Net.UnitTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestDeserializer
|
||||
{
|
||||
private static string ResponsePath = "../../Responses/Json/{0}";
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void GetActualJsonRequest()
|
||||
{
|
||||
var credentials = new AuthenticatedUntappdCredentials(
|
||||
"",
|
||||
"",
|
||||
"");
|
||||
|
||||
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||
parameters.Add("q", "wild rose");
|
||||
|
||||
var repo = new Repository();
|
||||
//var resp = repo.Get<ActivityFeed.ActivityFeed>(credentials);
|
||||
var resp3 = repo.Get<BrewerySearch.BrewerySearch>(credentials, "", parameters);
|
||||
var resp2 = repo.Get<UserActivityFeed.UserActivityFeed>(credentials);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializeUserBadges()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserBadges.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserBadges.UserBadges>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerBeerInfo()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "BeerInfo.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<BeerInfo.BeerInfo>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerBeerSearch()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "BeerSearch.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<BeerSearch.BeerSearch>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerBreweryInfo()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "BreweryInfo.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<BreweryInfo.BreweryInfo>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerBrewerySearch()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "BrewerySearch.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<BrewerySearch.BrewerySearch>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerUserDistinctBeers()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserDistinctBeers.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserDistinctBeers.UserDistinctBeers>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerUserFriends()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserFriends.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserFriends.UserFriends>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerUserInfo()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserInfo.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserInfo.UserInfo>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerUserWishList()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserWishList.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserWishList.UserWishList>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerVenueInfo()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "VenueInfo.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<VenueInfo.VenueInfo>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerActivityFeed()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "ActivityFeed.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<ActivityFeed.ActivityFeed>(json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJsonDeserializerUserActivityFeed()
|
||||
{
|
||||
var json = System.IO.File.ReadAllText(string.Format(ResponsePath, "UserActivityFeed.json"));
|
||||
var jsonresult = JsonConvert.DeserializeObject<UserActivityFeed.UserActivityFeed>(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Responses\TestDeserializer.cs" />
|
||||
<Compile Include="Client\TestAuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\TestUnAuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Exception\TestBaseUntappdException.cs" />
|
||||
@@ -78,6 +78,18 @@
|
||||
<Compile Include="Request\TestRepository.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Responses\Json\ActivityFeed.json" />
|
||||
<None Include="Responses\Json\BeerInfo.json" />
|
||||
<None Include="Responses\Json\BeerSearch.json" />
|
||||
<None Include="Responses\Json\BreweryInfo.json" />
|
||||
<None Include="Responses\Json\BrewerySearch.json" />
|
||||
<None Include="Responses\Json\UserActivityFeed.json" />
|
||||
<None Include="Responses\Json\UserBadges.json" />
|
||||
<None Include="Responses\Json\UserDistinctBeers.json" />
|
||||
<None Include="Responses\Json\UserFriends.json" />
|
||||
<None Include="Responses\Json\UserInfo.json" />
|
||||
<None Include="Responses\Json\UserWishList.json" />
|
||||
<None Include="Responses\Json\VenueInfo.json" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Untappd.Net.Client
|
||||
{
|
||||
public interface IUnAuthenticadedUntappdCredentials : IUntappdCredentials
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
namespace Untappd.Net.Client
|
||||
{
|
||||
public interface IUnAuthenticatedUntappdCredentials : IUntappdCredentials
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Untappd.Net.Client
|
||||
{
|
||||
public class UnAuthenticatedUntappdCredentials : UntappdCredentials, IUnAuthenticadedUntappdCredentials
|
||||
public class UnAuthenticatedUntappdCredentials : UntappdCredentials, IUnAuthenticatedUntappdCredentials
|
||||
{
|
||||
/// <summary>
|
||||
/// UnAuthenticated request. Pass your API id and secret
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Untappd.Net.Client
|
||||
{
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using Untappd.Net.Client;
|
||||
using System.Threading;
|
||||
|
||||
namespace Untappd.Net.Request
|
||||
{
|
||||
@@ -10,6 +12,7 @@ namespace Untappd.Net.Request
|
||||
{
|
||||
internal IRestClient Client;
|
||||
internal IRestRequest Request;
|
||||
|
||||
public Repository()
|
||||
{
|
||||
Client = new RestClient(Constants.BaseRequestString);
|
||||
@@ -22,6 +25,17 @@ namespace Untappd.Net.Request
|
||||
Request = request;
|
||||
}
|
||||
|
||||
private void ConfigureGetRequest(IRestRequest request, string endPoint, IDictionary<string, string> bodyParameters = null)
|
||||
{
|
||||
request.Resource = endPoint;
|
||||
request.Method = Method.GET;
|
||||
if (request.Parameters != null) this.Request.Parameters.Clear();
|
||||
|
||||
if (bodyParameters != null)
|
||||
foreach (var param in bodyParameters)
|
||||
request.AddParameter(param.Key, param.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the things!
|
||||
/// </summary>
|
||||
@@ -30,39 +44,50 @@ namespace Untappd.Net.Request
|
||||
/// <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> (IUnAuthenticadedUntappdCredentials credentials, string urlParameter, IDictionary<string, string> bodyParameters = null)
|
||||
public TResult Get<TResult> (IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary<string, string> bodyParameters = null)
|
||||
where TResult : IUnAuthenticatedRequest,new()
|
||||
{
|
||||
var result = new TResult();
|
||||
Request.Resource = result.EndPoint(urlParameter);
|
||||
Request.Method = 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;
|
||||
this.ConfigureGetRequest(this.Request, result.EndPoint(urlParameter), bodyParameters);
|
||||
|
||||
this.Request.AddParameter("client_id", credentials.ClientId);
|
||||
this.Request.AddParameter("client_secret", credentials.ClientSecret);
|
||||
|
||||
return this.DoRestRequest<TResult>(this.Request);
|
||||
}
|
||||
|
||||
public TResult Get<TResult>(IAuthenticatedUntappdCredentials credentials, string parameter = "", IDictionary<string, string> bodyParameters = null)
|
||||
/// <summary>
|
||||
/// Get the things! authenticated!
|
||||
/// </summary>
|
||||
/// <typeparam name="TResult"></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>(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary<string, string> bodyParameters = null)
|
||||
where TResult : IAuthenticatedRequest, new()
|
||||
{
|
||||
var result = new TResult();
|
||||
var client = new RestClient(Constants.BaseRequestString);
|
||||
var request = new RestRequest(result.EndPoint(parameter), Method.GET);
|
||||
request.AddParameter("access_token", credentials.AccessToken);
|
||||
if (bodyParameters != null)
|
||||
foreach (var param in bodyParameters)
|
||||
request.AddParameter(param.Key, param.Value);
|
||||
this.ConfigureGetRequest(this.Request, result.EndPoint(urlParameter), bodyParameters);
|
||||
|
||||
var resp = client.Execute(request);
|
||||
var jsonresult = JsonConvert.DeserializeObject<TResult>(resp.Content);
|
||||
return jsonresult;
|
||||
this.Request.AddParameter("access_token", credentials.AccessToken);
|
||||
|
||||
return this.DoRestRequest<TResult>(this.Request);
|
||||
}
|
||||
|
||||
private TResult DoRestRequest<TResult>(IRestRequest request)
|
||||
{
|
||||
var client = new RestClient(Constants.BaseRequestString);
|
||||
var resp = client.Execute(request);
|
||||
return JsonConvert.DeserializeObject<TResult>(resp.Content);
|
||||
}
|
||||
|
||||
//private async Task<TResult> DoRestRequestAsync<TResult>(IRestRequest request)
|
||||
//{
|
||||
// var client = new RestClient(Constants.BaseRequestString);
|
||||
// var cancellationTokenSource = new CancellationTokenSource();
|
||||
// var resp = await client.ExecuteTaskAsync(request, cancellationTokenSource.Token);
|
||||
// return JsonConvert.DeserializeObject<TResult>(resp.Content);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.BeerInfo
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Stats
|
||||
{
|
||||
|
||||
@@ -312,7 +341,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public string Bio { get; set; }
|
||||
|
||||
[JsonProperty("relationship")]
|
||||
public object Relationship { get; set; }
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("user_avatar")]
|
||||
public string UserAvatar { get; set; }
|
||||
@@ -437,6 +466,59 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public IList<object> Items { get; set; }
|
||||
}
|
||||
|
||||
public class User3
|
||||
{
|
||||
|
||||
[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 IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item3
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User3 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
|
||||
{
|
||||
|
||||
@@ -447,10 +529,10 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("auth_toast")]
|
||||
public object AuthToast { get; set; }
|
||||
public bool AuthToast { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item3> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Photo2
|
||||
@@ -469,7 +551,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public string PhotoImgOg { get; set; }
|
||||
}
|
||||
|
||||
public class Item3
|
||||
public class Item4
|
||||
{
|
||||
|
||||
[JsonProperty("photo_id")]
|
||||
@@ -486,7 +568,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item3> Items { get; set; }
|
||||
public IList<Item4> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Source
|
||||
@@ -512,7 +594,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public string Lg { get; set; }
|
||||
}
|
||||
|
||||
public class Item4
|
||||
public class Item5
|
||||
{
|
||||
|
||||
[JsonProperty("badge_id")]
|
||||
@@ -541,7 +623,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item4> Items { get; set; }
|
||||
public IList<Item5> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
@@ -695,7 +777,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
public class Item5
|
||||
public class Item6
|
||||
{
|
||||
|
||||
[JsonProperty("rating_score")]
|
||||
@@ -718,17 +800,17 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item5> Items { get; set; }
|
||||
public IList<Item6> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Friends2
|
||||
{
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Beer5
|
||||
@@ -753,7 +835,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int IsVariant { get; set; }
|
||||
}
|
||||
|
||||
public class Item6
|
||||
public class Item7
|
||||
{
|
||||
|
||||
[JsonProperty("beer")]
|
||||
@@ -767,7 +849,7 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item6> Items { get; set; }
|
||||
public IList<Item7> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Beer
|
||||
@@ -849,13 +931,13 @@ namespace Untappd.Net.Responses.BeerInfo
|
||||
|
||||
public class BeerInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
protected override string _EndPoint { get { return "v4/beer/info{0}"; }
|
||||
}
|
||||
protected override string _EndPoint { get { return "v4/beer/info{0}"; } }
|
||||
|
||||
[JsonProperty("meta")]
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.BeerSearch
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.BeerSearch
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Beer
|
||||
{
|
||||
|
||||
@@ -164,122 +193,6 @@ namespace Untappd.Net.Responses.BeerSearch
|
||||
public IList<Item> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Beer2
|
||||
{
|
||||
|
||||
[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 double AuthRating { get; set; }
|
||||
|
||||
[JsonProperty("wish_list")]
|
||||
public bool WishList { get; set; }
|
||||
|
||||
[JsonProperty("in_production")]
|
||||
public int InProduction { 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 Location2
|
||||
{
|
||||
|
||||
[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
|
||||
{
|
||||
|
||||
@@ -287,59 +200,14 @@ namespace Untappd.Net.Responses.BeerSearch
|
||||
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 IList<object> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Breweries
|
||||
{
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item3> Items { get; set; }
|
||||
public IList<object> Items { get; set; }
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
@@ -390,13 +258,13 @@ namespace Untappd.Net.Responses.BeerSearch
|
||||
|
||||
public class BeerSearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
protected override string _EndPoint { get { return "v4/search/beer"; }
|
||||
}
|
||||
protected override string _EndPoint { get { return "v4/search/beer"; } }
|
||||
|
||||
[JsonProperty("meta")]
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.BreweryInfo
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class ClaimedStatus
|
||||
{
|
||||
|
||||
@@ -329,7 +358,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public string Bio { get; set; }
|
||||
|
||||
[JsonProperty("relationship")]
|
||||
public object Relationship { get; set; }
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("user_avatar")]
|
||||
public string UserAvatar { get; set; }
|
||||
@@ -429,6 +458,19 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
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 User3
|
||||
{
|
||||
|
||||
@@ -450,12 +492,6 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
[JsonProperty("location")]
|
||||
public string Location { get; set; }
|
||||
|
||||
[JsonProperty("relationship")]
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("is_supporter")]
|
||||
public int IsSupporter { get; set; }
|
||||
|
||||
[JsonProperty("user_avatar")]
|
||||
public string UserAvatar { get; set; }
|
||||
|
||||
@@ -472,87 +508,12 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public class Item3
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User3 User { get; set; }
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
public int CheckinId { get; set; }
|
||||
|
||||
[JsonProperty("comment_id")]
|
||||
public int CommentId { get; set; }
|
||||
|
||||
[JsonProperty("comment_owner")]
|
||||
public bool CommentOwner { get; set; }
|
||||
|
||||
[JsonProperty("comment_editor")]
|
||||
public bool CommentEditor { get; set; }
|
||||
|
||||
[JsonProperty("comment")]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("comment_source")]
|
||||
public string CommentSource { get; set; }
|
||||
}
|
||||
|
||||
public class Comments
|
||||
{
|
||||
|
||||
[JsonProperty("total_count")]
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item3> Items { get; set; }
|
||||
}
|
||||
|
||||
public class User4
|
||||
{
|
||||
|
||||
[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 IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item4
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User4 User { get; set; }
|
||||
|
||||
[JsonProperty("like_id")]
|
||||
public int LikeId { get; set; }
|
||||
|
||||
@@ -573,10 +534,10 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("auth_toast")]
|
||||
public object AuthToast { get; set; }
|
||||
public bool AuthToast { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item4> Items { get; set; }
|
||||
public IList<Item3> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Photo2
|
||||
@@ -595,7 +556,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public string PhotoImgOg { get; set; }
|
||||
}
|
||||
|
||||
public class Item5
|
||||
public class Item4
|
||||
{
|
||||
|
||||
[JsonProperty("photo_id")]
|
||||
@@ -612,7 +573,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item5> Items { get; set; }
|
||||
public IList<Item4> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Source
|
||||
@@ -638,7 +599,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public string Lg { get; set; }
|
||||
}
|
||||
|
||||
public class Item6
|
||||
public class Item5
|
||||
{
|
||||
|
||||
[JsonProperty("badge_id")]
|
||||
@@ -667,7 +628,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item6> Items { get; set; }
|
||||
public IList<Item5> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
@@ -832,21 +793,11 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public int BreweryActive { get; set; }
|
||||
}
|
||||
|
||||
public class Friends
|
||||
{
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
public class Item7
|
||||
public class Item6
|
||||
{
|
||||
|
||||
[JsonProperty("has_had")]
|
||||
public object HasHad { get; set; }
|
||||
public bool HasHad { get; set; }
|
||||
|
||||
[JsonProperty("total_count")]
|
||||
public int TotalCount { get; set; }
|
||||
@@ -858,7 +809,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public Brewery4 Brewery { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public Friends Friends { get; set; }
|
||||
public IList<object> Friends { get; set; }
|
||||
}
|
||||
|
||||
public class BeerList
|
||||
@@ -877,7 +828,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item7> Items { get; set; }
|
||||
public IList<Item6> Items { get; set; }
|
||||
|
||||
[JsonProperty("beer_count")]
|
||||
public int BeerCount { get; set; }
|
||||
@@ -962,7 +913,7 @@ namespace Untappd.Net.Responses.BreweryInfo
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.BrewerySearch
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.BrewerySearch
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Location
|
||||
{
|
||||
|
||||
@@ -117,13 +146,13 @@ namespace Untappd.Net.Responses.BrewerySearch
|
||||
|
||||
public class BrewerySearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
protected override string _EndPoint { get { return "v4/search/brewery"; }
|
||||
}
|
||||
protected override string _EndPoint { get { return "v4/search/brewery"; } }
|
||||
|
||||
[JsonProperty("meta")]
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace Untappd.Net.Responses.Feeds.ActivityFeed
|
||||
public double BeerAbv { get; set; }
|
||||
|
||||
[JsonProperty("auth_rating")]
|
||||
public int AuthRating { get; set; }
|
||||
public double AuthRating { get; set; }
|
||||
|
||||
[JsonProperty("wish_list")]
|
||||
public bool WishList { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Untappd.Net.Request;
|
||||
|
||||
namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
{
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -37,6 +37,35 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Pagination
|
||||
{
|
||||
|
||||
@@ -55,9 +84,6 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
|
||||
[JsonProperty("facebook")]
|
||||
public int Facebook { get; set; }
|
||||
|
||||
[JsonProperty("twitter")]
|
||||
public string Twitter { get; set; }
|
||||
}
|
||||
|
||||
public class User
|
||||
@@ -88,7 +114,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public string Bio { get; set; }
|
||||
|
||||
[JsonProperty("relationship")]
|
||||
public object Relationship { get; set; }
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("user_avatar")]
|
||||
public string UserAvatar { get; set; }
|
||||
@@ -188,6 +214,74 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public int BreweryActive { 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("relationship")]
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("is_supporter")]
|
||||
public int IsSupporter { 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 IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
{
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User2 User { get; set; }
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
public int CheckinId { get; set; }
|
||||
|
||||
[JsonProperty("comment_id")]
|
||||
public int CommentId { get; set; }
|
||||
|
||||
[JsonProperty("comment_owner")]
|
||||
public bool CommentOwner { get; set; }
|
||||
|
||||
[JsonProperty("comment_editor")]
|
||||
public bool CommentEditor { get; set; }
|
||||
|
||||
[JsonProperty("comment")]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("comment_source")]
|
||||
public string CommentSource { get; set; }
|
||||
}
|
||||
|
||||
public class Comments
|
||||
{
|
||||
|
||||
@@ -198,10 +292,10 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item2> Items { get; set; }
|
||||
}
|
||||
|
||||
public class User2
|
||||
public class User3
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
@@ -232,17 +326,17 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public string AccountType { get; set; }
|
||||
|
||||
[JsonProperty("brewery_details")]
|
||||
public object BreweryDetails { get; set; }
|
||||
public IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
public class Item3
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User2 User { get; set; }
|
||||
public User3 User { get; set; }
|
||||
|
||||
[JsonProperty("like_id")]
|
||||
public int LikeId { get; set; }
|
||||
@@ -264,10 +358,10 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("auth_toast")]
|
||||
public object AuthToast { get; set; }
|
||||
public bool AuthToast { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item2> Items { get; set; }
|
||||
public IList<Item3> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Photo
|
||||
@@ -286,7 +380,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public string PhotoImgOg { get; set; }
|
||||
}
|
||||
|
||||
public class Item3
|
||||
public class Item4
|
||||
{
|
||||
|
||||
[JsonProperty("photo_id")]
|
||||
@@ -303,7 +397,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item3> Items { get; set; }
|
||||
public IList<Item4> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Source
|
||||
@@ -329,7 +423,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public string Lg { get; set; }
|
||||
}
|
||||
|
||||
public class Item4
|
||||
public class Item5
|
||||
{
|
||||
|
||||
[JsonProperty("badge_id")]
|
||||
@@ -358,7 +452,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item4> Items { get; set; }
|
||||
public IList<Item5> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
@@ -432,7 +526,7 @@ namespace Untappd.Net.Responses.Feeds.UserActivityFeed
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Untappd.Net.Request;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Untappd.Net.Responses.UserBadges
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +39,35 @@ namespace Untappd.Net.Responses.UserBadges
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Media
|
||||
{
|
||||
|
||||
@@ -61,15 +91,54 @@ namespace Untappd.Net.Responses.UserBadges
|
||||
public int Total { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
public class BadgeLevel
|
||||
{
|
||||
[JsonProperty("actual_badge_id")]
|
||||
public int ActualBadgeId { get; set; }
|
||||
|
||||
[JsonProperty("badge_id")]
|
||||
public int BadgeId { 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; }
|
||||
}
|
||||
|
||||
public class Levels
|
||||
{
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<BadgeLevel> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
{
|
||||
|
||||
[JsonProperty("user_badge_id")]
|
||||
public int UserBadgeId { get; set; }
|
||||
|
||||
[JsonProperty("badge_id")]
|
||||
public int BadgeId { get; set; }
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
public int CheckinId { get; set; }
|
||||
|
||||
@@ -97,7 +166,13 @@ namespace Untappd.Net.Responses.UserBadges
|
||||
[JsonProperty("category_id")]
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
[JsonProperty("levels")]
|
||||
/// <summary>
|
||||
/// Issue with bad json responses
|
||||
/// levels might come as object levels : { ... }
|
||||
/// or an empty array levels : []
|
||||
/// </summary>
|
||||
[JsonProperty(PropertyName = "levels")]
|
||||
[JsonConverter(typeof(SingleObjectArrayConverter<Levels>))]
|
||||
public object Levels { get; set; }
|
||||
|
||||
[JsonProperty("badge_pack")]
|
||||
@@ -126,6 +201,11 @@ namespace Untappd.Net.Responses.UserBadges
|
||||
public IList<Item> Items { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// jsonutils.com fails to parse Untappd response for this requests
|
||||
/// It fails getting the badge levels.
|
||||
/// added manually.
|
||||
/// </summary>
|
||||
public class UserBadges : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
protected override string _EndPoint { get { return "v4/user/badges{0}"; } }
|
||||
@@ -134,7 +214,7 @@ namespace Untappd.Net.Responses.UserBadges
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.UserFriends
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.UserFriends
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class User
|
||||
{
|
||||
|
||||
@@ -113,10 +142,9 @@ namespace Untappd.Net.Responses.UserFriends
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.UserWishlist
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,157 @@ namespace Untappd.Net.Responses.UserWishlist
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { 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_abv")]
|
||||
public double BeerAbv { get; set; }
|
||||
|
||||
[JsonProperty("beer_ibu")]
|
||||
public int BeerIbu { get; set; }
|
||||
|
||||
[JsonProperty("beer_slug")]
|
||||
public string BeerSlug { get; set; }
|
||||
|
||||
[JsonProperty("beer_description")]
|
||||
public string BeerDescription { get; set; }
|
||||
|
||||
[JsonProperty("is_in_production")]
|
||||
public int IsInProduction { get; set; }
|
||||
|
||||
[JsonProperty("beer_style")]
|
||||
public string BeerStyle { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("auth_rating")]
|
||||
public double AuthRating { get; set; }
|
||||
|
||||
[JsonProperty("rating_score")]
|
||||
public double RatingScore { get; set; }
|
||||
|
||||
[JsonProperty("rating_count")]
|
||||
public int RatingCount { get; set; }
|
||||
|
||||
[JsonProperty("wish_list")]
|
||||
public bool WishList { get; set; }
|
||||
}
|
||||
|
||||
public class Contact
|
||||
{
|
||||
|
||||
[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 Contact Contact { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public Location Location { get; set; }
|
||||
|
||||
[JsonProperty("brewery_active")]
|
||||
public int BreweryActive { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
{
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("beer")]
|
||||
public Beer Beer { get; set; }
|
||||
|
||||
[JsonProperty("brewery")]
|
||||
public Brewery Brewery { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public IList<object> Friends { get; set; }
|
||||
}
|
||||
|
||||
public class Beers
|
||||
{
|
||||
|
||||
@@ -45,7 +196,7 @@ namespace Untappd.Net.Responses.UserWishlist
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Response
|
||||
@@ -67,11 +218,12 @@ namespace Untappd.Net.Responses.UserWishlist
|
||||
public class UserWishList : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
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; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Untappd.Net.Request;
|
||||
namespace Untappd.Net.Responses.VenueInfo
|
||||
{
|
||||
|
||||
public sealed class ResponseTime
|
||||
public class ResponseTime
|
||||
{
|
||||
|
||||
[JsonProperty("time")]
|
||||
@@ -38,6 +38,35 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public InitTime InitTime { get; set; }
|
||||
}
|
||||
|
||||
public class UnreadCount
|
||||
{
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public int Comments { get; set; }
|
||||
|
||||
[JsonProperty("toasts")]
|
||||
public int Toasts { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public int Friends { get; set; }
|
||||
|
||||
[JsonProperty("messages")]
|
||||
public int Messages { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public int News { get; set; }
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("unread_count")]
|
||||
public UnreadCount UnreadCount { get; set; }
|
||||
}
|
||||
|
||||
public class Item
|
||||
{
|
||||
|
||||
@@ -106,7 +135,7 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public string VenueState { get; set; }
|
||||
|
||||
[JsonProperty("venue_country")]
|
||||
public object VenueCountry { get; set; }
|
||||
public string VenueCountry { get; set; }
|
||||
|
||||
[JsonProperty("lat")]
|
||||
public double Lat { get; set; }
|
||||
@@ -119,58 +148,36 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
{
|
||||
|
||||
[JsonProperty("twitter")]
|
||||
public object Twitter { get; set; }
|
||||
public string Twitter { get; set; }
|
||||
|
||||
[JsonProperty("venue_url")]
|
||||
public object VenueUrl { get; set; }
|
||||
public string VenueUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Foursquare
|
||||
{
|
||||
|
||||
[JsonProperty("foursquare_id")]
|
||||
public object FoursquareId { get; set; }
|
||||
public string FoursquareId { get; set; }
|
||||
|
||||
[JsonProperty("foursquare_url")]
|
||||
public object FoursquareUrl { get; set; }
|
||||
public string FoursquareUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Media
|
||||
public class Photo
|
||||
{
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
[JsonProperty("photo_img_sm")]
|
||||
public string PhotoImgSm { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
}
|
||||
[JsonProperty("photo_img_md")]
|
||||
public string PhotoImgMd { get; set; }
|
||||
|
||||
public class User
|
||||
{
|
||||
[JsonProperty("photo_img_lg")]
|
||||
public string PhotoImgLg { 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; }
|
||||
[JsonProperty("photo_img_og")]
|
||||
public string PhotoImgOg { get; set; }
|
||||
}
|
||||
|
||||
public class Beer
|
||||
@@ -182,11 +189,26 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
[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_label")]
|
||||
public string BeerLabel { get; set; }
|
||||
[JsonProperty("beer_ibu")]
|
||||
public int BeerIbu { get; set; }
|
||||
|
||||
[JsonProperty("beer_slug")]
|
||||
public string BeerSlug { get; set; }
|
||||
|
||||
[JsonProperty("beer_description")]
|
||||
public string BeerDescription { get; set; }
|
||||
|
||||
[JsonProperty("is_in_production")]
|
||||
public int IsInProduction { get; set; }
|
||||
|
||||
[JsonProperty("beer_style_id")]
|
||||
public int BeerStyleId { get; set; }
|
||||
|
||||
[JsonProperty("beer_style")]
|
||||
public string BeerStyle { get; set; }
|
||||
@@ -210,9 +232,6 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
[JsonProperty("facebook")]
|
||||
public string Facebook { get; set; }
|
||||
|
||||
[JsonProperty("instagram")]
|
||||
public string Instagram { get; set; }
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
@@ -261,6 +280,31 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int BreweryActive { 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("user_avatar")]
|
||||
public string UserAvatar { get; set; }
|
||||
|
||||
[JsonProperty("relationship")]
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("is_private")]
|
||||
public int IsPrivate { get; set; }
|
||||
}
|
||||
|
||||
public class Item3
|
||||
{
|
||||
|
||||
@@ -297,7 +341,7 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public string VenueState { get; set; }
|
||||
|
||||
[JsonProperty("venue_country")]
|
||||
public object VenueCountry { get; set; }
|
||||
public string VenueCountry { get; set; }
|
||||
|
||||
[JsonProperty("lat")]
|
||||
public double Lat { get; set; }
|
||||
@@ -310,20 +354,20 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
{
|
||||
|
||||
[JsonProperty("twitter")]
|
||||
public object Twitter { get; set; }
|
||||
public string Twitter { get; set; }
|
||||
|
||||
[JsonProperty("venue_url")]
|
||||
public object VenueUrl { get; set; }
|
||||
public string VenueUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Foursquare2
|
||||
{
|
||||
|
||||
[JsonProperty("foursquare_id")]
|
||||
public object FoursquareId { get; set; }
|
||||
public string FoursquareId { get; set; }
|
||||
|
||||
[JsonProperty("foursquare_url")]
|
||||
public object FoursquareUrl { get; set; }
|
||||
public string FoursquareUrl { get; set; }
|
||||
}
|
||||
|
||||
public class VenueIcon2
|
||||
@@ -373,6 +417,340 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public VenueIcon2 VenueIcon { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
{
|
||||
|
||||
[JsonProperty("photo_id")]
|
||||
public int PhotoId { get; set; }
|
||||
|
||||
[JsonProperty("photo")]
|
||||
public Photo Photo { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
public int CheckinId { get; set; }
|
||||
|
||||
[JsonProperty("beer")]
|
||||
public Beer Beer { get; set; }
|
||||
|
||||
[JsonProperty("brewery")]
|
||||
public Brewery Brewery { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
|
||||
[JsonProperty("venue")]
|
||||
public Venue2 Venue { get; set; }
|
||||
}
|
||||
|
||||
public class Media
|
||||
{
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item2> 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("relationship")]
|
||||
public string 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 Beer2
|
||||
{
|
||||
|
||||
[JsonProperty("bid")]
|
||||
public int Bid { get; set; }
|
||||
|
||||
[JsonProperty("beer_name")]
|
||||
public string BeerName { 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 double AuthRating { get; set; }
|
||||
|
||||
[JsonProperty("wish_list")]
|
||||
public bool WishList { get; set; }
|
||||
|
||||
[JsonProperty("beer_active")]
|
||||
public int BeerActive { get; set; }
|
||||
}
|
||||
|
||||
public class Contact4
|
||||
{
|
||||
|
||||
[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 Location4
|
||||
{
|
||||
|
||||
[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 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 Contact4 Contact { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public Location4 Location { get; set; }
|
||||
|
||||
[JsonProperty("brewery_active")]
|
||||
public int BreweryActive { get; set; }
|
||||
}
|
||||
|
||||
public class Item5
|
||||
{
|
||||
|
||||
[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 Categories3
|
||||
{
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item5> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Location5
|
||||
{
|
||||
|
||||
[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 string VenueCountry { get; set; }
|
||||
|
||||
[JsonProperty("lat")]
|
||||
public double Lat { get; set; }
|
||||
|
||||
[JsonProperty("lng")]
|
||||
public double Lng { get; set; }
|
||||
}
|
||||
|
||||
public class Contact5
|
||||
{
|
||||
|
||||
[JsonProperty("twitter")]
|
||||
public string Twitter { get; set; }
|
||||
|
||||
[JsonProperty("venue_url")]
|
||||
public string VenueUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Foursquare3
|
||||
{
|
||||
|
||||
[JsonProperty("foursquare_id")]
|
||||
public string FoursquareId { get; set; }
|
||||
|
||||
[JsonProperty("foursquare_url")]
|
||||
public string FoursquareUrl { get; set; }
|
||||
}
|
||||
|
||||
public class VenueIcon3
|
||||
{
|
||||
|
||||
[JsonProperty("sm")]
|
||||
public string Sm { get; set; }
|
||||
|
||||
[JsonProperty("md")]
|
||||
public string Md { get; set; }
|
||||
|
||||
[JsonProperty("lg")]
|
||||
public string Lg { get; set; }
|
||||
}
|
||||
|
||||
public class Venue3
|
||||
{
|
||||
|
||||
[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 Categories3 Categories { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public Location5 Location { get; set; }
|
||||
|
||||
[JsonProperty("contact")]
|
||||
public Contact5 Contact { get; set; }
|
||||
|
||||
[JsonProperty("public_venue")]
|
||||
public bool PublicVenue { get; set; }
|
||||
|
||||
[JsonProperty("foursquare")]
|
||||
public Foursquare3 Foursquare { get; set; }
|
||||
|
||||
[JsonProperty("venue_icon")]
|
||||
public VenueIcon3 VenueIcon { get; set; }
|
||||
}
|
||||
|
||||
public class User3
|
||||
{
|
||||
|
||||
[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("relationship")]
|
||||
public string Relationship { get; set; }
|
||||
|
||||
[JsonProperty("is_supporter")]
|
||||
public int IsSupporter { 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 IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item6
|
||||
{
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User3 User { get; set; }
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
public int CheckinId { get; set; }
|
||||
|
||||
[JsonProperty("comment_id")]
|
||||
public int CommentId { get; set; }
|
||||
|
||||
[JsonProperty("comment_owner")]
|
||||
public bool CommentOwner { get; set; }
|
||||
|
||||
[JsonProperty("comment_editor")]
|
||||
public bool CommentEditor { get; set; }
|
||||
|
||||
[JsonProperty("comment")]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("comment_source")]
|
||||
public string CommentSource { get; set; }
|
||||
}
|
||||
|
||||
public class Comments
|
||||
{
|
||||
|
||||
@@ -383,7 +761,60 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item6> Items { get; set; }
|
||||
}
|
||||
|
||||
public class User4
|
||||
{
|
||||
|
||||
[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 IList<object> BreweryDetails { get; set; }
|
||||
}
|
||||
|
||||
public class Item7
|
||||
{
|
||||
|
||||
[JsonProperty("uid")]
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User4 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
|
||||
@@ -396,10 +827,36 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("auth_toast")]
|
||||
public object AuthToast { get; set; }
|
||||
public bool AuthToast { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item7> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Photo2
|
||||
{
|
||||
|
||||
[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 Item8
|
||||
{
|
||||
|
||||
[JsonProperty("photo_id")]
|
||||
public int PhotoId { get; set; }
|
||||
|
||||
[JsonProperty("photo")]
|
||||
public Photo2 Photo { get; set; }
|
||||
}
|
||||
|
||||
public class Media2
|
||||
@@ -409,7 +866,7 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item8> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Source
|
||||
@@ -419,7 +876,42 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public string AppName { get; set; }
|
||||
|
||||
[JsonProperty("app_website")]
|
||||
public object AppWebsite { get; set; }
|
||||
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 Item9
|
||||
{
|
||||
|
||||
[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
|
||||
@@ -429,10 +921,10 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item9> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item2
|
||||
public class Item4
|
||||
{
|
||||
|
||||
[JsonProperty("checkin_id")]
|
||||
@@ -442,22 +934,22 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("rating_score")]
|
||||
public int RatingScore { get; set; }
|
||||
public double RatingScore { get; set; }
|
||||
|
||||
[JsonProperty("checkin_comment")]
|
||||
public string CheckinComment { get; set; }
|
||||
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
public User2 User { get; set; }
|
||||
|
||||
[JsonProperty("beer")]
|
||||
public Beer Beer { get; set; }
|
||||
public Beer2 Beer { get; set; }
|
||||
|
||||
[JsonProperty("brewery")]
|
||||
public Brewery Brewery { get; set; }
|
||||
public Brewery2 Brewery { get; set; }
|
||||
|
||||
[JsonProperty("venue")]
|
||||
public Venue2 Venue { get; set; }
|
||||
public Venue3 Venue { get; set; }
|
||||
|
||||
[JsonProperty("comments")]
|
||||
public Comments Comments { get; set; }
|
||||
@@ -482,7 +974,145 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<Item2> Items { get; set; }
|
||||
public IList<Item4> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Beer3
|
||||
{
|
||||
|
||||
[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_description")]
|
||||
public string BeerDescription { get; set; }
|
||||
|
||||
[JsonProperty("is_in_production")]
|
||||
public int IsInProduction { get; set; }
|
||||
|
||||
[JsonProperty("beer_style_id")]
|
||||
public int BeerStyleId { get; set; }
|
||||
|
||||
[JsonProperty("beer_style")]
|
||||
public string BeerStyle { get; set; }
|
||||
|
||||
[JsonProperty("auth_rating")]
|
||||
public double AuthRating { get; set; }
|
||||
|
||||
[JsonProperty("wish_list")]
|
||||
public bool WishList { get; set; }
|
||||
|
||||
[JsonProperty("beer_active")]
|
||||
public int BeerActive { get; set; }
|
||||
|
||||
[JsonProperty("rating_score")]
|
||||
public double RatingScore { get; set; }
|
||||
|
||||
[JsonProperty("rating_count")]
|
||||
public int RatingCount { get; set; }
|
||||
}
|
||||
|
||||
public class Contact6
|
||||
{
|
||||
|
||||
[JsonProperty("twitter")]
|
||||
public string Twitter { get; set; }
|
||||
|
||||
[JsonProperty("facebook")]
|
||||
public string Facebook { get; set; }
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
||||
public class Location6
|
||||
{
|
||||
|
||||
[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 Brewery3
|
||||
{
|
||||
|
||||
[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 Contact6 Contact { get; set; }
|
||||
|
||||
[JsonProperty("location")]
|
||||
public Location6 Location { get; set; }
|
||||
|
||||
[JsonProperty("brewery_active")]
|
||||
public int BreweryActive { get; set; }
|
||||
}
|
||||
|
||||
public class Friends
|
||||
{
|
||||
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Item10
|
||||
{
|
||||
|
||||
[JsonProperty("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("total_count")]
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
[JsonProperty("your_count")]
|
||||
public int YourCount { get; set; }
|
||||
|
||||
[JsonProperty("beer")]
|
||||
public Beer3 Beer { get; set; }
|
||||
|
||||
[JsonProperty("brewery")]
|
||||
public Brewery3 Brewery { get; set; }
|
||||
|
||||
[JsonProperty("friends")]
|
||||
public Friends Friends { get; set; }
|
||||
}
|
||||
|
||||
public class TopBeers
|
||||
@@ -498,7 +1128,7 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
public int Count { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public IList<object> Items { get; set; }
|
||||
public IList<Item10> Items { get; set; }
|
||||
}
|
||||
|
||||
public class Venue
|
||||
@@ -556,16 +1186,15 @@ namespace Untappd.Net.Responses.VenueInfo
|
||||
|
||||
public class VenueInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest
|
||||
{
|
||||
protected override string _EndPoint { get { return "v4/venue/info{0}"; }
|
||||
}
|
||||
protected override string _EndPoint { get { return "v4/venue/info{0}"; } }
|
||||
|
||||
[JsonProperty("meta")]
|
||||
public Meta Meta { get; set; }
|
||||
|
||||
[JsonProperty("notifications")]
|
||||
public IList<object> Notifications { get; set; }
|
||||
public Notifications Notifications { get; set; }
|
||||
|
||||
[JsonProperty("response")]
|
||||
public Response Response { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
43
src/Untappd.Net/SingleObjectArrayConverter.cs
Normal file
43
src/Untappd.Net/SingleObjectArrayConverter.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Untappd.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Created to fix bad json results.
|
||||
/// Object expected but sometimes it comes as an empty array.
|
||||
///
|
||||
/// Deserialize json as T if json schema defines an object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
internal class SingleObjectArrayConverter<T> : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
object retval = new Object();
|
||||
|
||||
if (reader.TokenType == JsonToken.StartObject)
|
||||
{
|
||||
T instance = (T)serializer.Deserialize(reader, typeof(T));
|
||||
retval = instance;
|
||||
}
|
||||
else if (reader.TokenType == JsonToken.StartArray)
|
||||
{
|
||||
reader.Read();
|
||||
retval = null;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,9 +46,10 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="SingleObjectArrayConverter.cs" />
|
||||
<Compile Include="Client\AuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\IAuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\IUnAuthenticadedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\IUnAuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\IUntappdCredentials.cs" />
|
||||
<Compile Include="Client\UnAuthenticatedUntappdCredentials.cs" />
|
||||
<Compile Include="Client\UntappdCredentials.cs" />
|
||||
|
||||
Reference in New Issue
Block a user