怎么获取steam用户的库存信息?

Steam饰品交易平台,翻硬币,开箱这些网站最基本的步骤就是获取个人用户的库存信息。下面介绍下获取库存信息的接口。

接口地址:

http://steamcommunity.com/inventory/<PROFILEID>/440/2?l=english&count=5000 

通过这个接口,其中l是控制返回的数据为什么语言,english为返回英语,cn的话就是中文

count代表本次请求返回的库存数,最大不能超过5000

如果想分页请求的话,需要可以这样请求:

http://steamcommunity.com/inventory/<PROFILEID>/440/2?l=english&count=5000&start_assetid=468336866 

通过这个请求你可以获取以assetid 468336866算起的5000个饰品信息

请求返回的数据结构如下:

{ 

    'assets': <list>,

    'descriptions': <list>,

    'total_inventory_count': integer,

    'success': 1/0,

    'rwgran': integer

} 

assets字段返回的数据结果如下:

[{'amount': '1',

         'appid': '440',

         'assetid': '4985815666',

         'classid': '134',

         'contextid': '2',

         'instanceid': '0'},

        {'amount': '1',

         'appid': '440',

         'assetid': '4985815941',

         'classid': '22989188',

         'contextid': '2',

         'instanceid': '0'},

        ...

]

descriptions 字段包含的数据如下.

[{'actions': [{'link': 'http:\\/\\/wiki.teamfortress.com\\/scripts\\/itemredirect.php?id=241&lang=en_US',

                            'name': 'Item Wiki Page...'}],

               'appid': 440,

               'background_color': '3C352E',

               'classid': '134',

               'commodity': 0,

               'currency': 0,

               'descriptions': [{'type': 'text',

                                 'value': 'Is an enemy player questioning your skills, personal hygiene, and\\/or ancestry?\nUse these stylish firearms to challenge them to a duel!\nSee the Mann Co. Catalog for full details.'},

                                {'type': 'text', 'value': ' '},

                                {'color': '00a000',

                                 'type': 'text',

                                 'value': 'This is a limited use item.  Uses: 5'}],

               'icon_url': 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgECbwgfYh_3vTRKhs_ZAfOeD-VOyo4z4clTizJqwQcpYOHnNDFmcweRVqQPCqVq91C-WCM26pFnB4PjofUWJ1uAGDnHsA',

               'icon_url_large': 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgECbwgfYh_3vTRKhs_ZAfOeD-VOyo4z4clTizJqwQcpYOHnNDFmcweRVqQPCqVq91C-WCM26pFnB4PjofUWJ1uAGDnHsA',

               'instanceid': '0',

               'market_hash_name': 'Dueling Mini-Game',

               'market_marketable_restriction': 0,

               'market_name': 'Dueling Mini-Game',

               'market_tradable_restriction': 7,

               'marketable': 0,

               'name': 'Dueling Mini-Game',

               'name_color': '7D6D00',

               'tags': [{'category': 'Quality',

                         'color': '7D6D00',

                         'internal_name': 'Unique',

                         'localized_category_name': 'Quality',

                         'localized_tag_name': 'Unique'},

                        {'category': 'Type',

                         'internal_name': 'TF_UsableItem',

                         'localized_category_name': 'Type',

                         'localized_tag_name': 'Usable Item'},

                        {'category': 'Class',

                         'internal_name': 'Scout',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Scout'},

                        {'category': 'Class',

                         'internal_name': 'Sniper',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Sniper'},

                        {'category': 'Class',

                         'internal_name': 'Soldier',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Soldier'},

                        {'category': 'Class',

                         'internal_name': 'Demoman',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Demoman'},

                        {'category': 'Class',

                         'internal_name': 'Medic',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Medic'},

                        {'category': 'Class',

                         'internal_name': 'Heavy',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Heavy'},

                        {'category': 'Class',

                         'internal_name': 'Pyro',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Pyro'},

                        {'category': 'Class',

                         'internal_name': 'Spy',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Spy'},

                        {'category': 'Class',

                         'internal_name': 'Engineer',

                         'localized_category_name': 'Class',

                         'localized_tag_name': 'Engineer'}],

               'tradable': 1,

               'type': 'Level 5 Usable Item'},

      ...

]

 

 

Pingbacks已打开。

Trackbacks
  1. viagra sale auckland 发布于 2018年8月8日 12:33 #

    怎么获取steam用户的库存信息?

  2. order viagra new zealand 发布于 2018年8月9日 08:36 #

    怎么获取steam用户的库存信息?

  3. http://xpornplease.com 发布于 2018年8月9日 08:41 #

    怎么获取steam用户的库存信息?

  4. order viagra mail 发布于 2018年8月14日 10:28 #

    怎么获取steam用户的库存信息?

  5. http://newyorkveincenter.com/__media__/js/netsoltr 发布于 2018年9月12日 10:19 #

    怎么获取steam用户的库存信息?

  6. http://www.nhhappenings.com/links_frame.asp?L=http 发布于 2018年9月12日 12:32 #

    怎么获取steam用户的库存信息?

  7. http://2transport.com/__media__/js/netsoltrademark 发布于 2018年9月13日 00:45 #

    怎么获取steam用户的库存信息?

  8. http://publicsensor.com/__media__/js/netsoltradema 发布于 2018年9月13日 01:57 #

    怎么获取steam用户的库存信息?

  9. psychoterapeuta krakow 发布于 2018年9月23日 15:26 #

    怎么获取steam用户的库存信息?

  10. 힐스테이트 삼송역 스칸센 发布于 2018年10月7日 06:21 #

    怎么获取steam用户的库存信息?

引用地址

评论