/
index.ts
45 lines (39 loc) · 971 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { MethodMetadata, Parameter } from '../..';
import { Headers } from '../../../helpers/axios';
import { useRestCall } from '../../../helpers/rest-calls';
const path = 'vezgo-url/:userProfileId/?provider=:provider';
export function useMethod({ pathParameters, body }: any) {
const { data, error, loading, getData } = useRestCall({
pathParameters,
headers: Headers,
body,
metadata,
});
return { data, error, loading, getData };
}
const parameters: Parameter[] = [
{
key: 1,
name: 'userProfileId',
description: 'User ID',
required: 'yes',
default: '',
dataType: 'string',
},
{
key: 2,
name: 'provider',
description: 'Provider Name',
required: 'yes',
default: '',
dataType: 'string',
},
];
export const metadata: MethodMetadata = {
author: 'Aaron Knott',
authorPicture: '',
description: 'Get a Vezgo Link for a specific provider',
name: path,
method: 'GET',
parameters,
};