-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* YOYO NEW API SPEC! * Add UserIdentifier test data generator * Add CodeLanguage test code generator * Fix up file creation executor test generator * Add shortlink deletion to expectedToFail * Whoops, include the new example files * Generated new lib * 2.0.8 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 49lf <[email protected]>
- Loading branch information
1 parent
692924e
commit 79b5873
Showing
36 changed files
with
1,506 additions
and
77 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
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,18 @@ | ||
import { orgs } from '../../src/index.js'; | ||
|
||
async function example() { | ||
const response = await orgs.get_org_shortlinks({ | ||
limit: 7, | ||
page_token: 'string', | ||
sort_by: 'created_at_ascending', | ||
}); | ||
if ('error_code' in response) throw response; | ||
|
||
return response; | ||
} | ||
|
||
describe('Testing orgs.get_org_shortlinks', () => { | ||
it('should be truthy or throw', async () => { | ||
expect(await example()).toBeTruthy(); | ||
}); | ||
}); |
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
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
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
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,21 @@ | ||
import { users } from '../../src/index.js'; | ||
|
||
async function example() { | ||
const response = await users.create_user_shortlink({ | ||
body: { | ||
password: | ||
'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.', | ||
restrict_to_org: true, | ||
url: 'The URL to redirect back to.', | ||
}, | ||
}); | ||
if ('error_code' in response) throw response; | ||
|
||
return response; | ||
} | ||
|
||
describe('Testing users.create_user_shortlink', () => { | ||
it('should be truthy or throw', async () => { | ||
expect(await example()).toBeTruthy(); | ||
}); | ||
}); |
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 { users } from '../../src/index.js'; | ||
|
||
async function example() { | ||
const response = await users.delete_user_shortlink({ key: 'string' }); | ||
if ('error_code' in response) throw response; | ||
|
||
return response; | ||
} | ||
|
||
describe('Testing users.delete_user_shortlink', () => { | ||
it('should be truthy or throw', async () => { | ||
try { | ||
await example(); | ||
} catch (err) { | ||
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect | ||
} | ||
}); | ||
}); |
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
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 { users } from '../../src/index.js'; | ||
|
||
async function example() { | ||
const response = await users.get_user_shortlinks({ | ||
limit: 7, | ||
page_token: 'string', | ||
sort_by: 'created_at_ascending', | ||
}); | ||
if ('error_code' in response) throw response; | ||
|
||
return response; | ||
} | ||
|
||
describe('Testing users.get_user_shortlinks', () => { | ||
it('should be truthy or throw', async () => { | ||
expect(await example()).toBeTruthy(); | ||
}); | ||
}); |
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,21 @@ | ||
import { users } from '../../src/index.js'; | ||
|
||
async function example() { | ||
const response = await users.update_user_shortlink({ | ||
key: 'string', | ||
body: { | ||
password: | ||
'The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.', | ||
restrict_to_org: true, | ||
}, | ||
}); | ||
if ('error_code' in response) throw response; | ||
|
||
return response; | ||
} | ||
|
||
describe('Testing users.update_user_shortlink', () => { | ||
it('should be truthy or throw', async () => { | ||
expect(await example()).toBeTruthy(); | ||
}); | ||
}); |
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 +1 @@ | ||
example | ||
console.log("ok") |
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,5 @@ | ||
package main | ||
import "fmt" | ||
func main() { | ||
fmt.Println("lee was here") | ||
} |
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 @@ | ||
console.log('lee was here') |
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 @@ | ||
print "lee was here" |
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
Oops, something went wrong.