Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Question about radiant_logo and dire_logo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about radiant_logo and dire_logo

    Is there any way to get actual team logo images using IDs (radiant_logo and dire_logo) returned by https://api.steampowered.com/IDOTA2M...hDetails/V001/?


    Also, there are two variables returned by the same method:
    • radiant_team_complete
    • dire_team_complete

    What do they mean?

    For example, in match #37584550:
    Code:
    "radiant_name": "Natus Vincere",
    "radiant_logo": 920110421043409300,
    "radiant_team_complete": 1,
    "dire_name": "LGD-GAMING",
    "dire_logo": 596975880634081200,
    "dire_team_complete": 1
    Steam is awesome.

  • #2
    Give this example a shot:

    https://api.steampowered.com/IDOTA2M...ch_id=37623177
    Code:
    		"radiant_name": "Natus Vincere",
    		"radiant_logo": 920110421043409228,   <<<<<<<<<<<
    		"radiant_team_complete": 1,
    		"dire_name": "Invictus Gaming",
    		"dire_logo": 939254794963968818,
    		"dire_team_complete": 1

    http://api.steampowered.com/ISteamRe...pid=570&ugcid=920110421043409228
    Code:
    	"data": {
    		"filename": "teams/team_logo_1343406470",
    		"url": "http://cloud-2.steampowered.com/ugc/920110421043409228/82E0398179759BD48DA9486A7F10CB1ECE55A713/",
    		"size": 26332
    	}
    Then grab the file at that URL for your team logo.
    Last edited by DanielJ; 01-29-2013, 06:53 PM.
    WebAPI Examples: All (on GitHub) | Live League Game Signature Image

    Comment


    • #3
      Thx!
      You gotta FIGHT!
      For Your RIGHT!
      To BUUUGFIX!

      Comment


      • #4
        Thanks, Daniel. It works.

        What about radiant_team_complete/dire_team_complete?
        Last edited by Gentlecat; 01-29-2013, 12:00 AM.
        Steam is awesome.

        Comment


        • #5
          Originally posted by DanielJ View Post
          Give this example a shot:

          https://api.steampowered.com/IDOTA2M...ch_id=37623177
          Code:
          		"radiant_name": "Natus Vincere",
          		"radiant_logo": 920110421043409228,   <<<<<<<<<<<
          		"radiant_team_complete": 1,
          		"dire_name": "Invictus Gaming",
          		"dire_logo": 939254794963968818,
          		"dire_team_complete": 1

          http://api.steampowered.com/ISteamRe...pid=570&ugcid=920110421043409228
          Code:
          	"data": {
          		"filename": "teams/team_logo_1343406470",
          		"url": "http://cloud-2.steampowered.com/ugc/920110421043409228/82E0398179759BD48DA9486A7F10CB1ECE55A713/",
          		"size": 26332
          	}
          Then grab the file at that URL for your team logo.
          Looks like in this case it's a .png file, but is this always the same? Cause the filename doesn't include an extension.

          Comment


          • #6
            Originally posted by Arie View Post
            Looks like in this case it's a .png file, but is this always the same? Cause the filename doesn't include an extension.
            from what i've seen all the dota images are in PNG (items, heroes, etc). So i think it's*safe to* assume they'd probably convert all custom team logos to png for convenience.
            The API Bible: Things You Should Know Before Starting API Development

            Comment


            • #7
              Originally posted by Gentlecat View Post
              Thanks, Daniel. It works.

              What about radiant_team_complete/dire_team_complete?
              I believe that signifies that all 5 players on the Radiant/Dire belong to that team (and that there aren't any stand-ins from elsewhere.)
              Last edited by DanielJ; 01-29-2013, 06:53 PM.
              WebAPI Examples: All (on GitHub) | Live League Game Signature Image

              Comment


              • #8
                For some reason when attempting to access the logo I am getting a 'The information you requested could not be retrieved.' This is the link I am attempting to pull the image from for Na'Vi

                http://cloud-2.steampowered.com/ugc/...1343406470.png

                Comment


                • #9
                  Try just using what is in the actual "url" part of the GetUGCFileDetails API response, i.e. http://cloud-2.steampowered.com/ugc/...0CB1ECE55A713/.
                  That seems to work for me.

                  Comment


                  • #10
                    Originally posted by jmack View Post
                    For some reason when attempting to access the logo I am getting a 'The information you requested could not be retrieved.' This is the link I am attempting to pull the image from for Na'Vi

                    http://cloud-2.steampowered.com/ugc/...1343406470.png
                    Where did you pull teams/team_logo_1343406470.png from? That's not part of the URL.

                    Comment


                    • #11
                      now not work this.......

                      {
                      "status": {
                      "code": 9
                      }
                      }

                      Comment


                      • #12
                        You might be running into this error: http://dev.dota2.com/showthread.php?t=108156

                        It's a real nasty one having to do with number encoding in different languages. Although the logo_ids are returned in the JSON response in a number-like field, depending on the JSON parser/language you're working in, uint64 style numbers might be longer than can be represented natively and you'll get some bizarre truncation issues that lead to you accidentally submitting a different ID than you saw in MatchDetails (or wherever you're getting radiant_logo/dire_logo).

                        Comment


                        • #13
                          In a product i'm building, i'm looking to get the images for live league team logo's. Because of the API limits, i'm storing info from the valve api's and I rebroadcast the live game api, so I restrict the number of calls to my api key. Currently i'm planning on just rebroadcasting the url's of the images and not the images for the teams. The actual images themselves don't require an API key, getting the url's does. But my question is whether I should also pull the actual images themselves. And re-serve them myself. The only reason i'd consider doing this is for performance / reliability. Does anyone have any experience with these logo's? Is the performance pretty good?

                          Also, i don't suspect there are any batch optimizations that can be made so as not to use up API calls for each individual image? API calls are my limited resource (one per seconds, 100k a day) if I'm showing live pro games, it'd be great to reduce any calls to the logo's url api as possible, if anyone has any ideas please let me know. Thanks.
                          Last edited by Hatunike; 03-08-2015, 02:38 PM.

                          Comment

                          Working...
                          X