mirror of
https://github.com/foss42/apidash.git
synced 2025-05-29 21:06:01 +08:00
Migrate to API Dash APIs
This commit is contained in:
@ -7,7 +7,7 @@ void main() {
|
||||
|
||||
group('GET Request', () {
|
||||
test('GET 1', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -33,7 +33,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 2', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/country/data?code=US';
|
||||
r"""let url = 'https://api.apidash.dev/country/data?code=US';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -59,7 +59,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 3', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/country/data?code=IND';
|
||||
r"""let url = 'https://api.apidash.dev/country/data?code=IND';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -85,7 +85,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 4', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/humanize/social?num=8700000&digits=3&system=SS&add_space=true&trailing_zeros=true';
|
||||
r"""let url = 'https://api.apidash.dev/humanize/social?num=8700000&digits=3&system=SS&add_space=true&trailing_zeros=true';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -168,7 +168,7 @@ fetch(url, options)
|
||||
});
|
||||
|
||||
test('GET 7', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -223,7 +223,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 9', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/humanize/social?num=8700000&add_space=true';
|
||||
r"""let url = 'https://api.apidash.dev/humanize/social?num=8700000&add_space=true';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -249,7 +249,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 10', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/humanize/social';
|
||||
r"""let url = 'https://api.apidash.dev/humanize/social';
|
||||
|
||||
let options = {
|
||||
method: 'GET',
|
||||
@ -283,7 +283,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 11', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/humanize/social?num=8700000&digits=3';
|
||||
r"""let url = 'https://api.apidash.dev/humanize/social?num=8700000&digits=3';
|
||||
|
||||
let options = {
|
||||
method: 'GET',
|
||||
@ -312,7 +312,7 @@ fetch(url, options)
|
||||
|
||||
test('GET 12', () {
|
||||
const expectedCode =
|
||||
r"""let url = 'https://api.foss42.com/humanize/social';
|
||||
r"""let url = 'https://api.apidash.dev/humanize/social';
|
||||
|
||||
let options = {
|
||||
method: 'GET'
|
||||
@ -339,7 +339,7 @@ fetch(url, options)
|
||||
|
||||
group('HEAD Request', () {
|
||||
test('HEAD 1', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev';
|
||||
|
||||
let options = {
|
||||
method: 'HEAD'
|
||||
@ -364,7 +364,7 @@ fetch(url, options)
|
||||
});
|
||||
|
||||
test('HEAD 2', () {
|
||||
const expectedCode = r"""let url = 'http://api.foss42.com';
|
||||
const expectedCode = r"""let url = 'http://api.apidash.dev';
|
||||
|
||||
let options = {
|
||||
method: 'HEAD'
|
||||
@ -391,7 +391,7 @@ fetch(url, options)
|
||||
|
||||
group('POST Request', () {
|
||||
test('POST 1', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com/case/lower';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev/case/lower';
|
||||
|
||||
let options = {
|
||||
method: 'POST',
|
||||
@ -421,7 +421,7 @@ fetch(url, options)
|
||||
});
|
||||
|
||||
test('POST 2', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com/case/lower';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev/case/lower';
|
||||
|
||||
let options = {
|
||||
method: 'POST',
|
||||
@ -451,7 +451,7 @@ fetch(url, options)
|
||||
});
|
||||
|
||||
test('POST 3', () {
|
||||
const expectedCode = r"""let url = 'https://api.foss42.com/case/lower';
|
||||
const expectedCode = r"""let url = 'https://api.apidash.dev/case/lower';
|
||||
|
||||
let options = {
|
||||
method: 'POST',
|
||||
|
Reference in New Issue
Block a user