Something went wrong. Try again.
OpenAPI 3.0 compliant spec for TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136import { operation, requestBodySchema, response200, response500, security, statusSchema, tags,} from '../chunks.ts';
// NOTE: alliance *management* (create, invite, leave, stash, propositions/voting) lives on the// Embassy building, not this module — see src/spec/paths/buildings/embassy.ts. This module only// exposes read-only alliance lookups.export const alliance = { '/v2/alliance/view_profile': { post: { ...tags('alliance'), ...security(), ...operation( "View an alliance's public profile.", 'Provides a list of the data that is publicly known about an alliance. Throws 1002.' ),
...requestBodySchema({ type: 'object', required: ['alliance_id'], properties: { alliance_id: { type: 'integer', description: "The id of the alliance for which you'd like to retrieve the public profile.", }, }, }),
responses: { ...response200("Provides a list of the data that's publicly known about this alliance.", { type: 'object', required: ['profile', 'status'], properties: { profile: { type: 'object', required: [ 'id', 'name', 'description', 'leader_id', 'date_created', 'members', 'space_stations', 'influence', ], properties: { id: { type: 'integer' }, name: { type: 'string' }, description: { type: 'string' }, leader_id: { type: 'integer' }, date_created: { type: 'string' }, members: { type: 'array', items: { type: 'object', required: ['id', 'name'], properties: { id: { type: 'integer' }, name: { type: 'string' } }, }, }, space_stations: { type: 'array', items: { type: 'object', required: ['id', 'name', 'x', 'y'], properties: { id: { type: 'integer' }, name: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' }, }, }, }, influence: { type: 'integer' }, }, }, status: statusSchema(), }, }), ...response500(), }, }, },
'/v2/alliance/find': { post: { ...tags('alliance'), ...security(), ...operation( 'Find alliances by name.', 'Finds an alliance by name. Returns a hash reference containing alliance ids and alliance names.' ),
...requestBodySchema({ type: 'object', required: ['name'], properties: { name: { type: 'string', description: "The name you're searching for. Case insensitive, and partial names work fine. Must be at least 3 characters.", }, }, }),
responses: { ...response200( 'Find an alliance by name. Case insensitive, partial matches accepted. Must be at least 3 characters.', { type: 'object', required: ['alliances', 'status'], properties: { alliances: { type: 'array', items: { type: 'object', required: ['id', 'name'], properties: { id: { type: 'integer' }, name: { type: 'string' } }, }, }, status: statusSchema(), }, } ), ...response500(), }, }, },};