Skip to content

Commit

Permalink
0.3 - Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
takecchi committed Oct 15, 2023
1 parent f8f0b2c commit 344c04d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cuculus/cuculus-api",
"version": "0.2.5",
"version": "0.3",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
34 changes: 22 additions & 12 deletions src/apis/TimelinesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ import {
} from '../models/index';

export interface GetHomeTimelineRequest {
limit?: number;
maxId?: string;
sinceId?: string;
untilId?: string;
minId?: string;
limit?: number;
}

export interface GetPublicTimelineRequest {
limit?: number;
maxId?: string;
sinceId?: string;
untilId?: string;
minId?: string;
limit?: number;
}

/**
Expand All @@ -45,16 +47,20 @@ export class TimelinesApi extends runtime.BaseAPI {
async getHomeTimelineRaw(requestParameters: GetHomeTimelineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserPost>>> {
const queryParameters: any = {};

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
if (requestParameters.maxId !== undefined) {
queryParameters['max_id'] = requestParameters.maxId;
}

if (requestParameters.sinceId !== undefined) {
queryParameters['since_id'] = requestParameters.sinceId;
}

if (requestParameters.untilId !== undefined) {
queryParameters['until_id'] = requestParameters.untilId;
if (requestParameters.minId !== undefined) {
queryParameters['min_id'] = requestParameters.minId;
}

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}

const headerParameters: runtime.HTTPHeaders = {};
Expand Down Expand Up @@ -91,16 +97,20 @@ export class TimelinesApi extends runtime.BaseAPI {
async getPublicTimelineRaw(requestParameters: GetPublicTimelineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserPost>>> {
const queryParameters: any = {};

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
if (requestParameters.maxId !== undefined) {
queryParameters['max_id'] = requestParameters.maxId;
}

if (requestParameters.sinceId !== undefined) {
queryParameters['since_id'] = requestParameters.sinceId;
}

if (requestParameters.untilId !== undefined) {
queryParameters['until_id'] = requestParameters.untilId;
if (requestParameters.minId !== undefined) {
queryParameters['min_id'] = requestParameters.minId;
}

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}

const headerParameters: runtime.HTTPHeaders = {};
Expand Down
17 changes: 11 additions & 6 deletions src/apis/UsersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ export interface GetUserFollowingRequest {

export interface GetUserPostsRequest {
id: number;
limit?: number;
maxId?: string;
sinceId?: string;
untilId?: string;
minId?: string;
limit?: number;
}

/**
Expand Down Expand Up @@ -315,16 +316,20 @@ export class UsersApi extends runtime.BaseAPI {

const queryParameters: any = {};

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
if (requestParameters.maxId !== undefined) {
queryParameters['max_id'] = requestParameters.maxId;
}

if (requestParameters.sinceId !== undefined) {
queryParameters['since_id'] = requestParameters.sinceId;
}

if (requestParameters.untilId !== undefined) {
queryParameters['until_id'] = requestParameters.untilId;
if (requestParameters.minId !== undefined) {
queryParameters['min_id'] = requestParameters.minId;
}

if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}

const headerParameters: runtime.HTTPHeaders = {};
Expand Down

0 comments on commit 344c04d

Please sign in to comment.