Coder Social home page Coder Social logo

developer-portal's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developer-portal's Issues

Results reporting

An API endpoint (e.g. GraphQL mutation) for submitting match results would be very useful to have.

Make stages, game selections queryable on GraphQL endpoint, a la videogames

The title says it all really; currently, we can query the universe of videogames so that we can investigate and maintain mappings to data on our side.

However, with stages and game selections (i.e. character selections) we have to save the values that come from Smashgg and then reconcile the stage selections/game selections manually so that we can create a map.

Having the ability to query both of these upfront would eliminate the need to perform the manual evaluation step (we could define the mapping up front).

Projected Sets

I don't see any way to retrieve sets that are available after the projected option is used on the website.

By that I mean all sets that have at least one entrant in orange like it is showcased on this screen shot:
image

Sortby Statement in Tournament By Videogame Example Creates "Unknown Error"

Edit: This seems to actually be an issue with the sortby statement, since removing this solved the issue, so I'll be changing the title to reflect this.

I've been attempting to use the GraphQL tester to see if I could search tournaments by video game, but every time I run the example code (or slight variations where the videogameID is a string), I keep getting an "unknown error has occurred" message. Other queries seem to be working fine in the api tester. I'm really not sure what I've done since the code is copy-pasted from this example.

My authorization token is included in the format specified in the Developer Portal instructions (under "Headers") per instructions.

image

Get player by gt

Hello,

I would like to request this feature with the idea of building a player search bar.

Our project needs a custom tournament registration workflow.

  1. User inputs a smash.gg GT.
  2. User pays a tournament fee through our site.
  3. We register the player to the tournament through smash.gg (manually for now).

We need a way to link the GT they provided to a valid smash.gg user.

Thanks!

attendees-by-sponsor query no longer giving correct response

I am trying to utilize the attendees-by-sponsor query for my library but it does not seem to properly filter out the participants with empty prefix to return the correct participants with the given prefix.

To be sure I ran the example in attendees-by-sponsor query in https://github.com/smashgg/developer-portal/blob/master/docs/examples/queries/attendees-by-sponsor.md but that also did not work properly.

My code is similar to that docs code since im trying to achieve the same thing so using that one would be best to debug.

Null response when using TournamentPageFilter.ids field

The TournamentPageFilter.ids field would be extremely useful for retrieving multiple tournaments at once by their ids. However, it does not appear to work in that way. Requesting tournaments with the ids field in the filter returns no tournaments at all (the tournaments.nodes response is null).

For example:

query Query {
  tournaments(query: {
    perPage:5,
    filter: {
      ids:[114457]
    }
  }) {
    nodes {
      id
      name
    }
  }
}

returns

{
  "data": {
    "tournaments": {
      "nodes": null
    }
  },
  "extensions": {
    "cacheControl": {
      "version": 1,
      "hints": [
        {
          "path": [
            "tournaments"
          ],
          "maxAge": 600,
          "scope": "PRIVATE"
        }
      ]
    },
    "queryComplexity": 0
  },
  "actionRecords": []
}

Even though 114457 is the correct id for Evo 2019. The same id works with the tournament query.

Get only one attendee instead of 2 when fetching certain sets

Hi, when fetching some sets I found something weird which happens with multiple sets.
For instance, with the following Graph QL query :

query Temp {
  set(id: 20840483) {
    id,
    slots {
      id,
      entrant {
        id,
        name
      },      
    },
    identifier
  }
}

I only get 1 attendee instead of 2 as shown in the results below :

{
  "data": {
    "set": {
      "id": 20840483,
      "slots": [
        {
          "id": "20840483-0",
          "entrant": {
            "id": 3027035,
            "name": "SM | Ellis"
          }
        }
      ],
      "identifier": "BH"
    }
  },
  "extensions": {
    "cacheControl": {
      "version": 1,
      "hints": null
    },
    "queryComplexity": 3
  },
  "actionRecords": []
}

To prove that there should be 2 attendees, here is the set.
We can easily see that Ellis playes against Rad Dad.

Option filter 'playerIds' in SetFilters does new requests

Option filter 'playerIds' in SetFilters does new requests

Hello, when I request Sets of a Player and I use the playerIds filter option to filter on Sets of this Player and the specified playersIds
Then the API returns Sets of this Player OR Sets of the playersIds.

I query the API from a Player, and I access Sets of THIS Player without filter option.
So if I use playersIds filter option it should just filter on sets of THIS Player AND sets of playersIds. But here this filter option adds additional Sets which are not part of the Player root.

I think, "Thinking in Graphs" its not respected here ?

It is possible that you are using the same resolver for Sets and for Sets of a Player with filters

They should be different ?

Maybe I didn't understand well how these filters work and GraphQl too. I am waiting for your return so that you can give me your point of view.

I have attached an example of the queries I used.

In the response I just want sets of "gamerTag": "doude" VS "gamerTag": "Kinato"

Variables are at the end of files

Query getPlayerSets :
query_getPlayerSets.txt

Query getPlayerVsPlayerSets :
query_getPlayerVsPlayerSets.txt

Publicly accessible locationDisplayName

I've noticed the tournament object returned on the start.gg homepage has a property called locationDisplayName. I haven't seen anything like this available in the public API.

Looking for a clean way to display locations without having to mess with different combinations of addrState, city, countryCode, postalCode, and venueAddress due to differences in international addresses.

What is currently being sent in locationDisplayName seems to be perfect for my needs.

earth#2222 in the Discord recommended I open an issue for easy tracking.

Back-end query results limited to 10,000 entries

Hello everyone,

There seems to be a limit of 10,000 query results in the back-end.

Maybe it's an unique case because few tournament reach 10.000+ attendees but for the Evo2023 tournament with 11058 attendees, it's impossible to reach the end of a ParticipantPaginationQuery.

Here is an illustration :

image
image
As you can see, There is 443 pages and I can paginate to page 400.

When I want page 401, i get :
image
no more results and no more page.

You can also test it directly on start.gg in the Evo2023 tournament's page.
In the attendees list : https://www.start.gg/tournament/evo-2023/attendees
you have results till page 400 : https://www.start.gg/tournament/evo-2023/attendees?page=400
but impossible to go any further : https://www.start.gg/tournament/evo-2023/attendees?page=400

This may be normal behavior, but I haven't seen any such limitation in the documentation.

GraphQL IDs serialized as numbers

I would like to report a bug in the GraphQL API. The spec (https://spec.graphql.org/October2021/#sec-ID) says:

The ID type is serialized in the same way as a String; however, it is not intended to be human-readable. While it is often numeric, it should always serialize as a String.

However, your API returns IDs as JSON Numbers!

>>> requests.post('https://api.start.gg/gql/alpha', headers={'Authorization': f'Bearer {auth_token}'}, json={'query': 'query SetQuery { set(id: "51850276") { id } }'}).text
'{"data":{"set":{"id":51850276}},"extensions":{"cacheControl":{"version":1,"hints":null},"queryComplexity":1},"actionRecords":[]}'

(This field's type is given as ID at https://developer.start.gg/reference/set.doc.html.)

Allow filtering tournaments by hasOfflineEvents

It is currently possible to filter tournaments by hasOnlineEvents, but not hasOfflineEvents.

Even if there are no mixed events, which i'm not sure of, it seems odd to be able to filter by one and not the other.

Inconsistent placement values

When I look at placement of sets in a tournament, the wPlacement and lPlacement are different from the placements i get when checking the entrant standing placement
{ "wPlacement": 9, "lPlacement": 9, "slots": [ { "entrant": { "standing": { "placement": 25 }, "name": "PEPIS | Videowaffles" } }, { "entrant": { "standing": { "placement": 33 }, "name": "Big Ben" } } ] },

"nodes": [ { "wPlacement": 2, "lPlacement": 3, "slots": [ { "entrant": { "standing": { "placement": 1 }, "name": "PikaThePikachu" } }, { "entrant": { "standing": { "placement": 9 }, "name": "Rambo" } } ] }

Short Slug Query Not Returning Latest Tournament

Hi, previously I've been able to hit the API endpoint with this query:

query TournamentQuery($slug: String, $eventFilter: EventFilter) { tournament(slug: $slug) { id name events(filter:$eventFilter) { name id startAt videogame { id slug } } }

With baccpaBrawl as the slug, and it's given the latest version of that tournament. However, at least as of today, it returns the info for the very first baccpaBrawl, even though https://www.start.gg/baccpaBrawl redirects to the latest. Other short slugs don't appear to have the issue. Maybe it's some configuration thing on their side, but I figured I would bring the inconsistency to your attention.

add `minAttendees` and `maxAttendees` fields to `TournamentPageFilter` input object

It would allow for queries that are partially possible with the site already.
For example, this:

https://www.start.gg/search/tournaments
?refinementList[events.videogame.id]=1386
&refinementList[state][0]=3
&refinementList[hasOnlineEvents][0]=false
&page=1
&configure[hitsPerPage]=15
&configure[filters]=profileType:tournament
&range[startAt][min]=1641013200
&range[numAttendees][min]=1001

can become this:

query {
  tournaments(
    query: {
      page: 1
      perPage: 500
      sortBy: "startAt asc"
      filter: {
        videogameIds: [1386]
        afterDate: 1641013200
        hasOnlineEvents: false
        # maybe something like this idk
        minAttendees: 1001
      }
    }
  ) {
    nodes {
      id
      name
      startAt
    }
  }
}

Query complexity too high but is at or under the maximum

When running the following code I get errors relating to complexity, where I am at the maximum but it still rejects, showing I am at the maximum complexity but not over, and it also shows as having a complexity of 0 at the bottom above action records
query TournamentsByVideogame { tournaments(query: { perPage: 1000 page:1 sortBy: "startAt desc" filter: { past: true videogameIds: [ 1386 ] } }) { nodes { name id slug } } }

{ "errors": [ { "message": "Your query complexity is too high. A maximum of 1000 objects may be returned by each request. (actual: 1000)", "extensions": { "category": "validation" }, "locations": [ { "line": 2, "column": 7 } ], "path": [ "tournaments" ], "type": "validation", "fields": null, "fieldErrors": [] } ], "data": { "tournaments": null }, "extensions": { "cacheControl": { "version": 1, "hints": [ { "path": [ "tournaments" ], "maxAge": 600, "scope": "PRIVATE" } ] }, "queryComplexity": 0 }, "actionRecords": [] }

Add support for problem details (content type application/problem+json) for server side errors.

It seems when accessing API endpoints, if there is a server-side error, an HTML page is returned (with content type text/html).

Example:

https://discord.com/channels/339548254704369677/504697661795074058/795571273958162452

In these cases, it would be helpful for API consumers to be able to get a structured response to which would enable more sane error handling/diagnosis/triaging in the face of errors.

To that end, it would be helpful if non-200 responses for API endpoints would return problem details (with content type application/problem+json), as per the RFC:

https://tools.ietf.org/html/rfc7807

Most HTTP server frameworks have some sort of package that will perform error handling in the request pipeline and return problem details (this is not a request for it to be coded from scratch).

Retrieve Discord tag using smash.gg graphql API

Hi,

I require the attendees of my tournament joining our community Discord server thus giving their Discord nametag in the field meant for that purpose.
I am aware one can decide whether to hide their Discord nametag from **public or not.

Retrieving attendees data using my API key linked to my account (which is admin of this tournament) gives the following result :
unknown_2
GraphQL request to retrieve connected accounts
We can see on the picture above that the player "Artsnif" has no Discord nametag according to the graphql response.

When I retrieve the attendee list from smash.gg front-end website the Discord nametag of every player even if they decided to publicly hide it. Pictures below :
image
Player with no visible Discord nametag
image
Player with visible Discord nametag
image
Attendee list export result (filtered) from smash.gg front-end

Is that behaviour normal ?

Force redirect `dev.start.gg/*` to `developer.start.gg/*`

Right now, if you go to dev.start.gg, it resolves properly - however, all URLs from that main page are are relative to the basic dev subdomain, and then none of those sites and URLs actually load.

Fix:

  1. Make dev.start.gg force redirect to developer.start.gg. Make all direct URLs to dev.start.gg endpoints automatically redirect properly to the developer.start.gg URLs. IE: If I go to dev.start.gg/explorer, it returns a 308 (Permanent Redirect) to developer.start.gg/explorer.
  2. Make dev.start.gg mirror all of developer.start.gg, so that URLs off the domain actually work.

Expose name, videogame ID on gameselection

Currently, we can get the numeric value for gameselection, but there is no value to indicate what the human-understandable thing that was selected is.

Additionally, if #102 is implemented, it will be helpful to have the videogame ID (or a connection to a videogame object) be exposed so that when querying over the universe, we can identify the game that the selections are applicable for.

Can't Sending Requests to a GraphQL API

Hello,
I use fetch with express for check smash gg API but i can't connect.
Can you tell me if you have a better solution please?

TypeError: Authorization: is not a legal HTTP header
`

app.get("/", (req, res) => {
    fetch("https://api.smash.gg/gql/alpha", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization:": " Bearer [mytoken]"
      },
      body: JSON.stringify({
        query: `query EventSets($eventId: ID!, $page: Int!, $perPage: Int!) {
            event(id: $eventId) {
              id
              name
              sets(
                page: $page
                perPage: $perPage
                sortType: STANDARD
              ) {
                pageInfo {
                  total
                }
                nodes {
                  id
                  slots {
                    id
                    entrant {
                      id
                      name
                    }
                  }
                }
              }
            }
          }`,
          variables: {
            "eventId":538503,
            "page": 1,
            "perPage": 10
          }
      })
    })
      .then(result => {
        return result.json();
      })
      .then(data => {
        console.log("data returned:\n", data);
        res.send(data);
      });
  });

paginatedSets sortType recent is BUG when a team gets DisQualified

When a team is Disqualified, the order of the paginaredSets changes.
When you ask for the sets order by RECENT, You get first the Non Disqualified Game instead of the recent one.

For example:
query getTeamsPerPhase { entrant(id: 9769392){ name isDisqualified paginatedSets(page: 1 perPage:15 sortType:RECENT){ nodes{ displayScore fullRoundText } } } }

returns
{ "data": { "entrant": { "name": "Team Ardour", "isDisqualified": null, "paginatedSets": { "nodes": [ { "displayScore": "RSC EU 2 - Team Ardour 0", "fullRoundText": "Winners Round 2" }, { "displayScore": "DQ", "fullRoundText": "Losers Round 1" } ] } } }, "extensions": { "cacheControl": { "version": 1, "hints": [ { "path": [ "entrant" ], "maxAge": 300, "scope": "PRIVATE" } ] }, "queryComplexity": 7 }, "actionRecords": [] }

But the expected result is:

{ "data": { "entrant": { "name": "Team Ardour", "isDisqualified": null, "paginatedSets": { "nodes": [ { "displayScore": "DQ", "fullRoundText": "Losers Round 1" },{ "displayScore": "RSC EU 2 - Team Ardour 0", "fullRoundText": "Winners Round 2" } ] } } }, "extensions": { "cacheControl": { "version": 1, "hints": [ { "path": [ "entrant" ], "maxAge": 300, "scope": "PRIVATE" } ] }, "queryComplexity": 7 }, "actionRecords": [] }

Event type documentation needs more clarification

Currently, the type variable in event is documented as such:

# The type of the event, whether an entrant will have one participant or multiple
type: Int

That doesn't really help all that much, especially for new people wanting to learn the API. It doesn't really help that singles returns 1 and teams returns 5 either, since most people would assume it would return 2 based on the docs.

Get Ranking Standalone

Make it possible to fetch ranking data like this. Currently it is possible to get ranking data when fetching player info but it would be helpful to be able to fetch it standalone.

Querying a tournament by name is not found

I was experimenting with the Start.gg developer portal and attempted to use this query to find a tournament filtering by its' name here:

query {
  tournaments(query: {
    page: 1
    filter: {
      name: "EVO 2022"
    }
  }) {
    nodes {
      name
    }
  }
}

But for some reason I don't see the tournament at all in the results.

{
  "data": {
    "tournaments": {
      "nodes": [
        {
          "name": "Super Bitfest 2022"
        },
        {
          "name": "UNGA - World Warrior 2022 - Oceania Final"
        },
        {
          "name": "Smash World Tour Championships 2022"
        },
        {
          "name": "Frostfire 2022"
        },
        {
          "name": "Capcom Pro Tour 2022 - North America East"
        },
        {
          "name": "SIDES - Battle Coliseum 2022"
        },
        {
          "name": "Battle Coliseum 2022"
        },
        {
          "name": "Mainstage 2022"
        },
        {
          "name": "Capcom Pro Tour 2022 - Europe East"
        },

The only way I get it to show up is by adding a sortByScore filter.

{
  "data": {
    "tournaments": {
      "nodes": [
        {
          "name": "Evo 2022"
        },
        {
          "name": "EVO 2022"
        },
        {
          "name": "Road to EVO 2022 The King of Fighters XV"
        },
        {
          "name": "Power Hook Dojo: Road to Vortex Gallery at Evo 2022"
        },
        {
          "name": "Evo Night!"
        },
        {
          "name": "Evo 2018"
        },
        {
          "name": "Evo 2020"
        },
...

Can't sortBy based on createdAt field

This request :

query TournamentsSorted {
  tournaments(query: {
    perPage: 10
    sortBy: "createdAt desc"
    filter: {
      past: false
    }
  }) {
    nodes {
      id
      name
      startAt
      createdAt
    }
  }
}

returns an empty response :

"data": {
    "tournaments": {
      "nodes": null
    }
  }

Whereas exactly the same query but with "startAt desc" works perfectly.

Ordernum is not distinct for games on set 16699504/constraint on ordernum

The following Graph QL query

query Temp {
    set(id: 16699504) {
        id,
        games {
            id,
            orderNum
        }
    }
}

Returns the following:

{
  "data": {
    "set": {
      "id": 16699504,
      "games": [
        {
          "id": 1338545,
          "orderNum": 1
        },
        {
          "id": 1338548,
          "orderNum": 2
        },
        {
          "id": 1338549,
          "orderNum": 2
        }
      ]
    }
  },
  "extensions": {
    "cacheControl": {
      "version": 1,
      "hints": null
    },
    "queryComplexity": 4
  },
  "actionRecords": []
}

Note that game IDs 1338548 and 1338549 both have an orderNum of 2.

How is this possible? Shouldn't there be a constraint/check on games (by set ID) which make the games are distinct?

Introspection fails due to syntax error

Hi there.

I'm wanting to integrate the graphql endpoint from Start along with others in StepZen, which requires them to introspect the schema in order to create endpoints. I am met with syntax errors currently. I.e the "standing" field @deprecated notice here: https://developer.start.gg/reference/standing.doc.html

// current
@deprecated( reason: "The "placement" field is identical and will eventually replace "standing"" )

// should either be escaped
@deprecated( reason: "The \"placement\" field is identical and will eventually replace \"standing\"" )
// or using single quotes
@deprecated( reason: "The 'placement' field is identical and will eventually replace 'standing'" )

There's a possiblity there's more of these throughout your schema, I am not sure.

Is it possible to get this/these fixed? Introspecting the schema will not work otherwise.

Improve Markdown formatting for version control

As mentioned in #17, longer lines in the documentation means there is a lot of potential for merge conflicts.

It may be best to split these up into smaller lines with max ~80 characters.
This does exclude a few things:

  • Links: as a link can take up more than 80 characters easily.
  • Code snippets: don't want to make the formatting look messed up and unreadable.

Migrate Website to Docusaurus 2 Alpha

Hi there (@dustinsgoodman and others)! The Docusaurus team is currently developing Docusaurus 2 and are almost done with an MVP that doesn't include translations and versioning features, which means there's feature parity with your website's current usage of Docusaurus.

Docusaurus 2 brings about many improvements:

  • Client-side rendering with prerendering (site renders without JavaScript!)
  • More flexible appearance - Customizable layouts, CSS modules, etc
  • Embeddable interactive React components within markdown via MDX

I will be your POC in helping you throughout the migration process. Let me know what you think!

cc @yangshun @endiliey @wgao19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.