Something went wrong. Try again.
OpenAPI 3.0 compliant spec for TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102import { operation, buildingBase, buildingCommonMethods, buildingView, requestBodySchema, response200, response500, security, statusSchema, tags,} from '../../chunks.ts';
const base = buildingBase('Network19');
export const network19 = { ...buildingCommonMethods(base), ...buildingView(base, { restrict_coverage: { type: 'integer', enum: [1, 0], description: 'Whether a policy restricting coverage of this planet is currently in effect. See restrict_coverage.', }, }),
[`${base}/restrict_coverage`]: { post: { ...tags(base), ...security(), ...operation( 'Restrict coverage.', 'Enacts or disbands a policy restricting what Network 19 covers about your planet.' ), ...requestBodySchema({ type: 'object', required: ['building_id', 'onoff'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, onoff: { type: 'integer', enum: [1, 0], description: 'Whether to restrict what Network 19 covers about your planet. Restricting makes citizens unhappy.', }, }, }), responses: { ...response200( 'Enacts or disbands a policy restricting what Network 19 covers about your planet.', { type: 'object', required: ['status'], properties: { status: statusSchema() } } ), ...response500(), }, }, },
[`${base}/view_news`]: { post: { ...tags(base), ...security(), ...operation( 'View news.', 'Returns the top 100 headlines from this zone, and a list of RSS feeds usable outside the game to see the same news.' ), ...requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, }, }), responses: { ...response200( 'Returns the top 100 headlines from this zone, and a list of RSS feeds usable outside the game to see the same news.', { type: 'object', required: ['news', 'feeds', 'status'], properties: { news: { type: 'array', items: { type: 'object', properties: { headline: { type: 'string' }, date: { type: 'string' } }, required: ['headline', 'date'], }, }, feeds: { type: 'object', description: 'Keyed by zone coordinates (e.g. "0|0|0"), values are RSS feed URLs.', additionalProperties: { type: 'string' }, }, status: statusSchema(), }, } ), ...response500(), }, }, },};