Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Newtonsoft.Json;
- using RestSharp;
- using System.Collections.Generic;
- using System;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading.Tasks;
- public class Program
- {
- public static void Main()
- {
- ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
- var client = new RestClient("https://store.playstation.com");
- var request = new RestRequest("/store/api/chihiro/00_09_000/container/GB/en/999/EP0177-CUSA05674_00-SONIC20170000000");
- var response = client.Execute(request);
- var data = JsonConvert.DeserializeObject<Response>(response.Content);
- }
- }
- public partial class Response
- {
- [JsonProperty("age_limit")]
- public long AgeLimit { get; set; }
- [JsonProperty("attributes")]
- public Attributes Attributes { get; set; }
- [JsonProperty("bucket")]
- public string Bucket { get; set; }
- [JsonProperty("container_type")]
- public string ContainerType { get; set; }
- [JsonProperty("content_descriptors")]
- public ContentDescriptor[] ContentDescriptors { get; set; }
- [JsonProperty("content_origin")]
- public long ContentOrigin { get; set; }
- [JsonProperty("content_rating")]
- public ContentRating ContentRating { get; set; }
- [JsonProperty("content_type")]
- public long ContentType { get; set; }
- [JsonProperty("default_sku")]
- public SkusClass DefaultSku { get; set; }
- [JsonProperty("dob_required")]
- public bool DobRequired { get; set; }
- [JsonProperty("gameContentTypesList")]
- public GameContentTypesList[] GameContentTypesList { get; set; }
- [JsonProperty("game_contentType")]
- public string GameContentType { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("images")]
- public Image[] Images { get; set; }
- [JsonProperty("links")]
- public Link[] Links { get; set; }
- [JsonProperty("long_desc")]
- public string LongDesc { get; set; }
- [JsonProperty("mediaList")]
- public MediaList MediaList { get; set; }
- [JsonProperty("media_layouts")]
- public MediaLayout[] MediaLayouts { get; set; }
- [JsonProperty("metadata")]
- public Dictionary<string, Metadatum> Metadata { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("pageTypeId")]
- public long PageTypeId { get; set; }
- [JsonProperty("playable_platform")]
- public string[] PlayablePlatform { get; set; }
- [JsonProperty("promomedia")]
- public Promomedia[] Promomedia { get; set; }
- [JsonProperty("provider_name")]
- public string ProviderName { get; set; }
- [JsonProperty("relationships")]
- public Relationship[] Relationships { get; set; }
- [JsonProperty("release_date")]
- public DateTimeOffset ReleaseDate { get; set; }
- [JsonProperty("restricted")]
- public bool Restricted { get; set; }
- [JsonProperty("revision")]
- public long Revision { get; set; }
- [JsonProperty("short_name")]
- public string ShortName { get; set; }
- [JsonProperty("size")]
- public long Size { get; set; }
- [JsonProperty("sku_links")]
- public object[] SkuLinks { get; set; }
- [JsonProperty("skus")]
- public SkusClass[] Skus { get; set; }
- [JsonProperty("sort")]
- public string Sort { get; set; }
- [JsonProperty("star_rating")]
- public StarRating StarRating { get; set; }
- [JsonProperty("start")]
- public long Start { get; set; }
- [JsonProperty("timestamp")]
- public long Timestamp { get; set; }
- [JsonProperty("title_name")]
- public string TitleName { get; set; }
- [JsonProperty("top_category")]
- public string TopCategory { get; set; }
- [JsonProperty("total_results")]
- public long TotalResults { get; set; }
- }
- public partial class Attributes
- {
- [JsonProperty("facets")]
- public Facets Facets { get; set; }
- [JsonProperty("next")]
- public object[] Next { get; set; }
- }
- public partial class Facets
- {
- [JsonProperty("game_content_type")]
- public AddonType[] GameContentType { get; set; }
- [JsonProperty("price")]
- public AddonType[] Price { get; set; }
- [JsonProperty("addon_type")]
- public AddonType[] AddonType { get; set; }
- [JsonProperty("top_category")]
- public AddonType[] TopCategory { get; set; }
- [JsonProperty("relationship")]
- public AddonType[] Relationship { get; set; }
- }
- public partial class AddonType
- {
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("count")]
- public long Count { get; set; }
- [JsonProperty("key")]
- public string Key { get; set; }
- }
- public partial class ContentDescriptor
- {
- [JsonProperty("description")]
- public string Description { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- }
- public partial class ContentRating
- {
- [JsonProperty("description")]
- public string Description { get; set; }
- [JsonProperty("rating_system")]
- public string RatingSystem { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- }
- public partial class SkusClass
- {
- [JsonProperty("amortizeFlag")]
- public bool AmortizeFlag { get; set; }
- [JsonProperty("bundleExclusiveFlag")]
- public bool BundleExclusiveFlag { get; set; }
- [JsonProperty("chargeImmediatelyFlag")]
- public bool ChargeImmediatelyFlag { get; set; }
- [JsonProperty("charge_type_id")]
- public long ChargeTypeId { get; set; }
- [JsonProperty("credit_card_required_flag")]
- public long CreditCardRequiredFlag { get; set; }
- [JsonProperty("defaultSku")]
- public bool DefaultSku { get; set; }
- [JsonProperty("display_price")]
- public string DisplayPrice { get; set; }
- [JsonProperty("eligibilities")]
- public object[] Eligibilities { get; set; }
- [JsonProperty("entitlements")]
- public SkusEntitlement[] Entitlements { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("is_original")]
- public bool IsOriginal { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("platforms")]
- public long[] Platforms { get; set; }
- [JsonProperty("price")]
- public long Price { get; set; }
- [JsonProperty("rewards")]
- public Reward[] Rewards { get; set; }
- [JsonProperty("seasonPassExclusiveFlag")]
- public bool SeasonPassExclusiveFlag { get; set; }
- [JsonProperty("skuAvailabilityOverrideFlag")]
- public bool SkuAvailabilityOverrideFlag { get; set; }
- [JsonProperty("sku_type")]
- public long SkuType { get; set; }
- [JsonProperty("type")]
- public string Type { get; set; }
- }
- public partial class SkusEntitlement
- {
- [JsonProperty("description")]
- public object Description { get; set; }
- [JsonProperty("drms")]
- public object[] Drms { get; set; }
- [JsonProperty("duration")]
- public long Duration { get; set; }
- [JsonProperty("durationOverrideTypeId")]
- public object DurationOverrideTypeId { get; set; }
- [JsonProperty("exp_after_first_use")]
- public long ExpAfterFirstUse { get; set; }
- [JsonProperty("feature_type_id")]
- public long FeatureTypeId { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("license_type")]
- public long LicenseType { get; set; }
- [JsonProperty("metadata")]
- public PurpleMetadata Metadata { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("packageType")]
- public string PackageType { get; set; }
- [JsonProperty("packages")]
- public Package[] Packages { get; set; }
- [JsonProperty("preorder_placeholder_flag")]
- public bool PreorderPlaceholderFlag { get; set; }
- [JsonProperty("size")]
- public long Size { get; set; }
- [JsonProperty("subType")]
- public long SubType { get; set; }
- [JsonProperty("subtitle_language_codes")]
- public string[] SubtitleLanguageCodes { get; set; }
- [JsonProperty("type")]
- public long Type { get; set; }
- [JsonProperty("use_count")]
- public long UseCount { get; set; }
- [JsonProperty("voice_language_codes")]
- public string[] VoiceLanguageCodes { get; set; }
- }
- public partial class PurpleMetadata
- {
- [JsonProperty("voiceLanguageCode")]
- public string[] VoiceLanguageCode { get; set; }
- [JsonProperty("subtitleLanguageCode")]
- public string[] SubtitleLanguageCode { get; set; }
- }
- public partial class Package
- {
- [JsonProperty("platformId")]
- public long PlatformId { get; set; }
- [JsonProperty("platformName")]
- public string PlatformName { get; set; }
- [JsonProperty("size")]
- public long Size { get; set; }
- }
- public partial class Reward
- {
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("discount")]
- public long Discount { get; set; }
- [JsonProperty("price")]
- public long Price { get; set; }
- [JsonProperty("reward_type")]
- public long RewardType { get; set; }
- [JsonProperty("display_price")]
- public string DisplayPrice { get; set; }
- [JsonProperty("isPlus")]
- public bool IsPlus { get; set; }
- [JsonProperty("campaigns")]
- public Campaign[] Campaigns { get; set; }
- [JsonProperty("start_date")]
- public DateTimeOffset StartDate { get; set; }
- [JsonProperty("end_date")]
- public DateTimeOffset EndDate { get; set; }
- [JsonProperty("bonus_discount")]
- public long BonusDiscount { get; set; }
- [JsonProperty("bonus_entitlement_id")]
- public string BonusEntitlementId { get; set; }
- [JsonProperty("bonus_price")]
- public long BonusPrice { get; set; }
- [JsonProperty("reward_source_type_id")]
- public long RewardSourceTypeId { get; set; }
- [JsonProperty("bonus_display_price")]
- public string BonusDisplayPrice { get; set; }
- }
- public partial class Campaign
- {
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("start_date")]
- public DateTimeOffset StartDate { get; set; }
- [JsonProperty("end_date")]
- public DateTimeOffset EndDate { get; set; }
- }
- public partial class GameContentTypesList
- {
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("key")]
- public string Key { get; set; }
- }
- public partial class Image
- {
- [JsonProperty("type")]
- public long Type { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- }
- public partial class Link
- {
- [JsonProperty("bucket")]
- public string Bucket { get; set; }
- [JsonProperty("cloud_only_platform")]
- public string[] CloudOnlyPlatform { get; set; }
- [JsonProperty("container_type")]
- public string ContainerType { get; set; }
- [JsonProperty("content_type")]
- public long ContentType { get; set; }
- [JsonProperty("default_sku")]
- public LinkDefaultSku DefaultSku { get; set; }
- [JsonProperty("gameContentTypesList")]
- public GameContentTypesList[] GameContentTypesList { get; set; }
- [JsonProperty("game_contentType")]
- public string GameContentType { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("images")]
- public Image[] Images { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("playable_platform")]
- public string[] PlayablePlatform { get; set; }
- [JsonProperty("provider_name")]
- public string ProviderName { get; set; }
- [JsonProperty("release_date")]
- public DateTimeOffset ReleaseDate { get; set; }
- [JsonProperty("restricted")]
- public bool Restricted { get; set; }
- [JsonProperty("revision")]
- public long Revision { get; set; }
- [JsonProperty("short_name")]
- public string ShortName { get; set; }
- [JsonProperty("timestamp")]
- public long Timestamp { get; set; }
- [JsonProperty("top_category")]
- public string TopCategory { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- }
- public partial class LinkDefaultSku
- {
- [JsonProperty("amortizeFlag")]
- public bool AmortizeFlag { get; set; }
- [JsonProperty("bundleExclusiveFlag")]
- public bool BundleExclusiveFlag { get; set; }
- [JsonProperty("chargeImmediatelyFlag")]
- public bool ChargeImmediatelyFlag { get; set; }
- [JsonProperty("charge_type_id")]
- public long ChargeTypeId { get; set; }
- [JsonProperty("credit_card_required_flag")]
- public long CreditCardRequiredFlag { get; set; }
- [JsonProperty("defaultSku")]
- public bool DefaultSku { get; set; }
- [JsonProperty("display_price")]
- public string DisplayPrice { get; set; }
- [JsonProperty("eligibilities")]
- public object[] Eligibilities { get; set; }
- [JsonProperty("entitlements")]
- public PurpleEntitlement[] Entitlements { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("is_original")]
- public bool IsOriginal { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("platforms")]
- public long[] Platforms { get; set; }
- [JsonProperty("price")]
- public long Price { get; set; }
- [JsonProperty("rewards")]
- public object[] Rewards { get; set; }
- [JsonProperty("seasonPassExclusiveFlag")]
- public bool SeasonPassExclusiveFlag { get; set; }
- [JsonProperty("skuAvailabilityOverrideFlag")]
- public bool SkuAvailabilityOverrideFlag { get; set; }
- [JsonProperty("sku_type")]
- public long SkuType { get; set; }
- [JsonProperty("type")]
- public string Type { get; set; }
- }
- public partial class PurpleEntitlement
- {
- [JsonProperty("description")]
- public object Description { get; set; }
- [JsonProperty("drms")]
- public object[] Drms { get; set; }
- [JsonProperty("duration")]
- public long Duration { get; set; }
- [JsonProperty("durationOverrideTypeId")]
- public object DurationOverrideTypeId { get; set; }
- [JsonProperty("exp_after_first_use")]
- public long ExpAfterFirstUse { get; set; }
- [JsonProperty("feature_type_id")]
- public long FeatureTypeId { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("license_type")]
- public long LicenseType { get; set; }
- [JsonProperty("metadata")]
- public FluffyMetadata Metadata { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("packageType")]
- public string PackageType { get; set; }
- [JsonProperty("packages")]
- public Package[] Packages { get; set; }
- [JsonProperty("preorder_placeholder_flag")]
- public bool PreorderPlaceholderFlag { get; set; }
- [JsonProperty("size")]
- public long Size { get; set; }
- [JsonProperty("subType")]
- public long SubType { get; set; }
- [JsonProperty("subtitle_language_codes")]
- public object SubtitleLanguageCodes { get; set; }
- [JsonProperty("type")]
- public long Type { get; set; }
- [JsonProperty("use_count")]
- public long UseCount { get; set; }
- [JsonProperty("voice_language_codes")]
- public object VoiceLanguageCodes { get; set; }
- }
- public partial class FluffyMetadata
- {
- [JsonProperty("packageSubType")]
- public string[] PackageSubType { get; set; }
- }
- public partial class MediaLayout
- {
- [JsonProperty("type")]
- public string Type { get; set; }
- [JsonProperty("height")]
- public long Height { get; set; }
- [JsonProperty("width")]
- public long Width { get; set; }
- }
- public partial class MediaList
- {
- [JsonProperty("previews")]
- public Preview[] Previews { get; set; }
- [JsonProperty("screenshots")]
- public Preview[] Screenshots { get; set; }
- }
- public partial class Preview
- {
- [JsonProperty("type")]
- public string Type { get; set; }
- [JsonProperty("typeId")]
- public long TypeId { get; set; }
- [JsonProperty("source")]
- public string Source { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- [JsonProperty("order")]
- public long Order { get; set; }
- }
- public partial class Metadatum
- {
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("values")]
- public string[] Values { get; set; }
- }
- public partial class Promomedia
- {
- [JsonProperty("id")]
- public long Id { get; set; }
- [JsonProperty("key")]
- public string Key { get; set; }
- [JsonProperty("type")]
- public long Type { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- }
- public partial class Relationship
- {
- [JsonProperty("count")]
- public long Count { get; set; }
- [JsonProperty("id")]
- public string Id { get; set; }
- [JsonProperty("key_name")]
- public string KeyName { get; set; }
- [JsonProperty("name")]
- public string Name { get; set; }
- [JsonProperty("url")]
- public Uri Url { get; set; }
- }
- public partial class StarRating
- {
- [JsonProperty("total")]
- public long Total { get; set; }
- [JsonProperty("score")]
- public string Score { get; set; }
- [JsonProperty("count")]
- public Count[] Count { get; set; }
- }
- public partial class Count
- {
- [JsonProperty("star")]
- public long Star { get; set; }
- [JsonProperty("count")]
- public long CountCount { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement