Skip to content

Latest commit

 

History

History
235 lines (161 loc) · 6.62 KB

FriendshipApi.md

File metadata and controls

235 lines (161 loc) · 6.62 KB

forestvpn_api.api.FriendshipApi

Load the API package

import 'package:forestvpn_api/api.dart';

All URIs are relative to https://api.forestvpn.com/v2

Method HTTP request Description
deleteFriend DELETE /friendship/friends/{id}/ Delete friend
getFriend GET /friendship/friends/{id}/ Friend details
getInvitation GET /friendship/invitations/{invitationID}/ Ivitation detail
listFriends GET /friendship/friends/ Get friends list
listFriendshipInvitation GET /friendship/invitations/ Friendship invitations list

deleteFriend

deleteFriend(id)

Delete friend

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFriendshipApi();
final String id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    api.deleteFriend(id);
} catch on DioError (e) {
    print('Exception when calling FriendshipApi->deleteFriend: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFriend

Friendship getFriend(id)

Friend details

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFriendshipApi();
final String id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final response = api.getFriend(id);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FriendshipApi->getFriend: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

Friendship

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInvitation

FriendshipInvitation getInvitation(invitationID)

Ivitation detail

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFriendshipApi();
final String invitationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final response = api.getInvitation(invitationID);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FriendshipApi->getInvitation: $e\n');
}

Parameters

Name Type Description Notes
invitationID String

Return type

FriendshipInvitation

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listFriends

BuiltList listFriends(perPage, page)

Get friends list

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFriendshipApi();
final int perPage = 56; // int | 
final int page = 56; // int | 

try {
    final response = api.listFriends(perPage, page);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FriendshipApi->listFriends: $e\n');
}

Parameters

Name Type Description Notes
perPage int [optional]
page int [optional]

Return type

BuiltList<Friendship>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listFriendshipInvitation

FriendshipInvitationList listFriendshipInvitation()

Friendship invitations list

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFriendshipApi();

try {
    final response = api.listFriendshipInvitation();
    print(response);
} catch on DioError (e) {
    print('Exception when calling FriendshipApi->listFriendshipInvitation: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

FriendshipInvitationList

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]