-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from berty/fetch-hack
feat: fetch hack example
- Loading branch information
Showing
11 changed files
with
376 additions
and
298 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: JS | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
build-and-lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: | ||
#- 10.x | ||
#- 12.x | ||
- 14.x | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- name: Use Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v2.5.0 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install node modules | ||
working-directory: rn | ||
run: yarn | ||
- name: Lint | ||
working-directory: rn | ||
run: yarn lint |
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 |
---|---|---|
@@ -1,55 +1,56 @@ | ||
export enum RequestOption { | ||
Bool = 'b', | ||
String = 's', | ||
Bytes = 'd' | ||
Bool = 'b', | ||
String = 's', | ||
Bytes = 'd', | ||
} | ||
|
||
export enum RequestBody { | ||
String = 's', | ||
Bytes = 'd' | ||
String = 's', | ||
Bytes = 'd', | ||
} | ||
|
||
export class RequestBuilder { | ||
public withArgument(argument: String): Promise<RequestBuilder>; | ||
public withOption(option: String, type: RequestOption.Bool, value: boolean): Promise<RequestBuilder>; | ||
public withOption(option: String, type: RequestOption.Bytes, value: Uint8Array): Promise<RequestBuilder>; | ||
public withOption(option: String, type: RequestOption.String, value: string): Promise<RequestBuilder>; | ||
public withBody(type: RequestBody.String, value: string): Promise<RequestBuilder>; | ||
public withBody(type: RequestBody.Bytes, value: Uint8Array): Promise<RequestBuilder>; | ||
public withHeader(header: string, value: string): Promise<RequestBuilder>; | ||
|
||
public send(): Promise<Uint8Array>; | ||
public sendToDict(): Promise<Record<string, any>>; | ||
|
||
public free(): Promise<void>; | ||
public withArgument(argument: String): Promise<RequestBuilder> | ||
public withOption( | ||
option: String, | ||
type: RequestOption.Bool, | ||
value: boolean | Uint8Array | string, | ||
): Promise<RequestBuilder> | ||
public withBody(type: RequestBody.String, value: Uint8Array | string): Promise<RequestBuilder> | ||
public withHeader(header: string, value: string): Promise<RequestBuilder> | ||
|
||
public send(): Promise<Uint8Array> | ||
public sendToDict(): Promise<Record<string, any>> | ||
|
||
public free(): Promise<void> | ||
} | ||
|
||
export class IPFS { | ||
public static defaultRepoPath: string; | ||
public static defaultRepoPath: string | ||
|
||
public static setDNSPair(primary: string, secondary: string): Promise<void>; | ||
public static setDNSPair(primary: string, secondary: string): Promise<void> | ||
|
||
public static create(repoPath?: string, internalStorage?: boolean): Promise<IPFS>; | ||
public static create(repoPath?: string, internalStorage?: boolean): Promise<IPFS> | ||
|
||
public start(): Promise<void>; | ||
public serveAPI(onTCPPort: string): Promise<string>; | ||
public serveGateway(onMultiaddr: string): Promise<string>; | ||
public stop(): Promise<void>; | ||
public restart(): Promise<void>; | ||
public start(): Promise<void> | ||
public serveAPI(onTCPPort: string): Promise<string> | ||
public serveGateway(onMultiaddr: string): Promise<string> | ||
public stop(): Promise<void> | ||
public restart(): Promise<void> | ||
|
||
public enablePubsubExperiment(): Promise<void>; | ||
public enableNamesysPubsub(): Promise<void>; | ||
public enablePubsubExperiment(): Promise<void> | ||
public enableNamesysPubsub(): Promise<void> | ||
|
||
public isStarted(): Promise<boolean>; | ||
public isStarted(): Promise<boolean> | ||
|
||
public getConfig(): Promise<Record<string, any>>; | ||
public getConfigKey(key: string): Promise<Record<string, any>>; | ||
public setConfig(config?: Record<string, any>): Promise<void>; | ||
public setConfigKey(key: string, value: Record<string, any>): Promise<void>; | ||
public getConfig(): Promise<Record<string, any>> | ||
public getConfigKey(key: string): Promise<Record<string, any>> | ||
public setConfig(config?: Record<string, any>): Promise<void> | ||
public setConfigKey(key: string, value: Record<string, any>): Promise<void> | ||
|
||
public getAbsoluteRepoPath(): Promise<string>; | ||
public getAbsoluteRepoPath(): Promise<string> | ||
|
||
public newRequest(command: string): Promise<RequestBuilder>; | ||
public newRequest(command: string): Promise<RequestBuilder> | ||
|
||
public free(): Promise<void>; | ||
} | ||
public free(): Promise<void> | ||
} |
Oops, something went wrong.