modrinthjs
Version:
A type safe Modrinth implementation.
75 lines (74 loc) • 2.88 kB
TypeScript
import type { EditableUser } from '../models/EditableUser';
import type { Project } from '../models/Project';
import type { User } from '../models/User';
import type { UserPayoutHistory } from '../models/UserPayoutHistory';
import type { CancelablePromise } from '../core/CancelablePromise';
export declare class UsersService {
/**
* Get a user
* @param idUsername The ID or username of the user
* @returns User Expected response to a valid request
* @throws ApiError
*/
static getUser(idUsername: string): CancelablePromise<User>;
/**
* Modify a user
* @param idUsername The ID or username of the user
* @param requestBody Modified user fields
* @returns void
* @throws ApiError
*/
static modifyUser(idUsername: string, requestBody?: EditableUser): CancelablePromise<void>;
/**
* Get user from authorization header
* @returns User Expected response to a valid request
* @throws ApiError
*/
static getUserFromAuth(): CancelablePromise<User>;
/**
* Get multiple users
* @param ids The IDs of the users
* @returns User Expected response to a valid request
* @throws ApiError
*/
static getUsers(ids: string): CancelablePromise<Array<User>>;
/**
* Change user's avatar
* The new avatar may be up to 2MiB in size.
* @param idUsername The ID or username of the user
* @param requestBody
* @returns void
* @throws ApiError
*/
static changeUserIcon(idUsername: string, requestBody?: Blob): CancelablePromise<void>;
/**
* Get user's projects
* @param idUsername The ID or username of the user
* @returns Project Expected response to a valid request
* @throws ApiError
*/
static getUserProjects(idUsername: string): CancelablePromise<Array<Project>>;
/**
* Get user's followed projects
* @param idUsername The ID or username of the user
* @returns Project Expected response to a valid request
* @throws ApiError
*/
static getFollowedProjects(idUsername: string): CancelablePromise<Array<Project>>;
/**
* Get user's payout history
* @param idUsername The ID or username of the user
* @returns UserPayoutHistory Expected response to a valid request
* @throws ApiError
*/
static getPayoutHistory(idUsername: string): CancelablePromise<UserPayoutHistory>;
/**
* Withdraw payout balance to PayPal or Venmo
* Warning: certain amounts get withheld for fees. Please do not call this API endpoint without first acknowledging the warnings on the corresponding frontend page.
* @param idUsername The ID or username of the user
* @param amount Amount to withdraw
* @returns void
* @throws ApiError
*/
static withdrawPayout(idUsername: string, amount: number): CancelablePromise<void>;
}