Skip to main content

Quickstart

Get up and running with the parry.gg gRPC API in under 5 minutes.

Prerequisites

  • Get your API key at parry.gg
  • Choose your development language

Client Libraries

JavaScript/TypeScript

Use our official client library:

npm install @parry-gg/client google-protobuf grpc-web

Full documentation: github.com/parry-gg/client

Python

Use our official Python client library:

pip install parrygg

Full documentation: github.com/parry-gg/parrygg-python

Other Languages

Generate clients from our protocol buffer definitions:

Protocol Buffers: github.com/parry-gg/protos

Supported languages: Go, Java, C#, Ruby, PHP, and more. Follow the Protocol Buffer documentation for your language.

Quick Examples

JavaScript/TypeScript

import { UserServiceClient, UpdateUserRequest, MutableUser } from '@parry-gg/client';

const client = new UserServiceClient('https://grpcweb.parry.gg');
const request = new UpdateUserRequest();
request.setId('user-id-here');

const user = new MutableUser();
user.setGamerTag('MyGamerTag');
user.setFirstName('John');
user.setLastName('Doe');
request.setUser(user);

// Authenticated API call with X-API-KEY
const response = await client.updateUser(request, {
'X-API-KEY': 'your-api-key-here'
});

Python

import grpc
from parrygg.services.tournament_service_pb2_grpc import TournamentServiceStub
from parrygg.services.tournament_service_pb2 import GetTournamentsRequest

# Connect to the API
channel = grpc.secure_channel("api.parry.gg:443", grpc.ssl_channel_credentials())
tournament_service = TournamentServiceStub(channel)

# Make an authenticated request
metadata = [("x-api-key", "your-api-key-here")]
request = GetTournamentsRequest()
response = tournament_service.GetTournaments(request, metadata=metadata)

Interactive API Explorer

Use grpcui to interact with the API via a gui:

Connect to parry.gg API

First, download the latest protoset file:

wget https://github.com/parry-gg/protos/raw/main/src/bundle.protoset

Then connect using the protoset:

grpcui --protoset bundle.protoset api.parry.gg:443

This opens a web interface where you can:

  • Browse all available services
  • Test API calls interactively
  • View request/response schemas
  • No code required!

(Remember to set the X-API-KEY header in the metadata of the request).

Next Steps