-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f65f15
commit 245458f
Showing
8 changed files
with
6,115 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,7 @@ | |
coverage/ | ||
src/generator/ | ||
api_call_test.ts | ||
/**/*.js | ||
/**/*.map | ||
node_modules/ | ||
*.tgz | ||
/**/*.d.ts | ||
_readme.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export interface SMethod { | ||
Name: string; | ||
fnName: string; | ||
QueryParameters: any[]; | ||
PathParameters: any[]; | ||
HeaderParameters: any[]; | ||
RequiredArgs: number; | ||
TotalArgs: number; | ||
Verb: string; | ||
Keep: boolean; | ||
RelativeRoute: any; | ||
} | ||
export interface SNode { | ||
FormatName: string; | ||
Class: SNode; | ||
Properties: SNode[]; | ||
Methods: SMethod[]; | ||
Route: string; | ||
PathParameter: string[]; | ||
} | ||
export interface IAPICall { | ||
verb: string; | ||
route: string; | ||
query?: string; | ||
body?: any; | ||
headers: any; | ||
} | ||
export declare type APIPreSend = (data: IAPICall) => Promise<any>; | ||
export declare class APIService { | ||
private server; | ||
private personalKey; | ||
private preSend; | ||
fnHandler(route: string, method: SMethod, personalKey: string, ...args: any[]): Promise<any>; | ||
send(data: IAPICall): Promise<any>; | ||
constructor(server: string, personalKey: string, API: SNode, preSend?: APIPreSend); | ||
checkListArgs(args: any[]): any[]; | ||
validateArgs(fnName: string, args: any[], required: number, total: number): any[]; | ||
getQuery(method: string, QueryParameters: string[], args: any[]): any; | ||
getHeaders(method: string, HeaderParameters: string[], args: any[]): {}; | ||
getRoute(route: string, method: SMethod, args: any): string; | ||
toFinal(node: SNode, route: string): any; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { IAccount, IDomains, IImages, ILinode, ILongview, IManaged, INetworking, INodebalancers, IProfile, IRegions, ISupport, IVolumes } from './interfaces'; | ||
import { APIPreSend } from "./APIMaker"; | ||
declare class Linodev4 { | ||
account: IAccount; | ||
domains: IDomains; | ||
images: IImages; | ||
linode: ILinode; | ||
longview: ILongview; | ||
managed: IManaged; | ||
networking: INetworking; | ||
nodebalancers: INodebalancers; | ||
profile: IProfile; | ||
regions: IRegions; | ||
support: ISupport; | ||
volumes: IVolumes; | ||
constructor(key: string, fn?: APIPreSend); | ||
} | ||
export { Linodev4, Linodev4 as default }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.