break up library, move bots to their own repositories
This commit is contained in:
59
packages/eve/src/esi/alliance.ts
Normal file
59
packages/eve/src/esi/alliance.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* EVE Swagger Interface - Alliance Endpoints
|
||||
* https://developers.eveonline.com/api-explorer#/operations/GetAlliances
|
||||
*/
|
||||
import { esiFetch, type PublicEsiOptions } from './util/fetch';
|
||||
|
||||
/**
|
||||
* List all active player alliances
|
||||
* - This route is cached for an hour
|
||||
* @returns {number[]} - An array of all active player alliance ids
|
||||
*/
|
||||
export async function listAlliances(options?: PublicEsiOptions): Promise<number[]> {
|
||||
return await esiFetch<number[]>('/alliances/', options);
|
||||
}
|
||||
|
||||
interface AllianceInfo {
|
||||
creator_corporation_id: number;
|
||||
creator_id: number;
|
||||
date_founded: string;
|
||||
executor_corporation_id: number;
|
||||
faction_id: number;
|
||||
name: string;
|
||||
ticker: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information about a specific alliance
|
||||
* - This route is cached for an hour
|
||||
* @param alliance_id Alliance id
|
||||
* @returns {AllianceInfo}
|
||||
*/
|
||||
export async function getAllianceInformation(alliance_id: number, options?: PublicEsiOptions): Promise<Partial<AllianceInfo>> {
|
||||
return await esiFetch<Partial<AllianceInfo>>(`/alliances/${alliance_id}/`, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* List all corporations in an alliance
|
||||
* - This route is cached for an hour
|
||||
* @param alliance_id Alliance id
|
||||
* @returns {number[]} - Array of corporation ids
|
||||
*/
|
||||
export async function listAllianceCorporations(alliance_id: number, options?: PublicEsiOptions): Promise<number[]> {
|
||||
return await esiFetch<number[]>(`/alliances/${alliance_id}/corporations/`, options);
|
||||
}
|
||||
|
||||
interface AllianceIcon {
|
||||
px128x128: string;
|
||||
px64x64: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get alliance icon
|
||||
* - This route is cached for an hour
|
||||
* @param alliance_id Alliance id
|
||||
* @returns {AllianceIcon}
|
||||
*/
|
||||
export async function getAllianceIcon(alliance_id: number, options?: PublicEsiOptions): Promise<Partial<AllianceIcon>> {
|
||||
return await esiFetch<Partial<AllianceIcon>>(`/alliances/${alliance_id}/icons/`, options);
|
||||
}
|
||||
Reference in New Issue
Block a user