forestvpn_api 1.0.6

  • Readme
  • Changelog
  • Installing
  • new53

forestvpn_api #

ForestVPN defeats content restrictions and censorship to deliver unlimited access to video, music, social media, and more, from anywhere in the world.

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Build package: org.openapitools.codegen.languages.DartClientCodegen For more information, please visit https://www.forestvpn.com/

Requirements #

Dart 2.0 or later

Installation & Usage #

Github #

If this Dart package is published to Github, add the following dependency to your pubspec.yaml

dependencies:
  forestvpn_api:
    git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Local #

To use the package in your local drive, add the following dependency to your pubspec.yaml

dependencies:
  forestvpn_api:
    path: /path/to/forestvpn_api

Tests #

TODO

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:forestvpn_api/api.dart';

// TODO Configure API key authorization: Bearer
//defaultApiClient.getAuthentication<ApiKeyAuth>('Bearer').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('Bearer').apiKeyPrefix = 'Bearer';

var api_instance = AppleApi();
var request = AppleVerifyReceiptRequest(); // AppleVerifyReceiptRequest | 

try {
    api_instance.verifyReceipt(request);
} catch (e) {
    print("Exception when calling AppleApi->verifyReceipt: $e\n");
}

Documentation for API Endpoints #

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

ClassMethodHTTP requestDescription
AppleApiverifyReceiptPOST /apple/verify-receipt/Verify receipt
GeoApigetCountriesGET /countries/List of available countries
GeoApigetLocationsGET /locations/List of available locations
GoogleApiverifyGooglePlayPurchasePOST /google/verify-purchase/Google play purchase verification service
UsageApigetTrafficGET /usage/traffic/Get traffic usage for current month
UserApigetPreferenceGET /user/preference/Get user preference
UserApigetPremiumGET /user/premium/Get premium status details
UserApiupdatePreferencePATCH /user/preference/Update user preference
WireguardApicreateProfilePOST /wg/profiles/Create new WireGuard profile
WireguardApideleteProfileDELETE /wg/profiles/{profileId}/Delete WireGuarg profile
WireguardApigetProfileGET /wg/profiles/{profileId}/Retrieve WireGuarg profile
WireguardApigetProfilesGET /wg/profiles/Retrieve list of WireGuard profiles

Documentation For Models #

Documentation For Authorization #

Bearer #

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author #

support@forestvpn.com

Changelog #

All notable changes to this project will be documented in this file.

[1.0.6] - 2020-05-19 #

Added #

  • Emoji to countries & locations endpoint

Changed #

  • No more response from apple receipt verify enpoint (now you should rely on 200 response, that's it)

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  forestvpn_api: ^1.0.6

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:forestvpn_api/api.dart';
import 'package:forestvpn_api/api/apple_api.dart';
import 'package:forestvpn_api/api/geo_api.dart';
import 'package:forestvpn_api/api/google_api.dart';
import 'package:forestvpn_api/api/usage_api.dart';
import 'package:forestvpn_api/api/user_api.dart';
import 'package:forestvpn_api/api/wireguard_api.dart';
import 'package:forestvpn_api/api_client.dart';
import 'package:forestvpn_api/api_exception.dart';
import 'package:forestvpn_api/api_helper.dart';
import 'package:forestvpn_api/auth/api_key_auth.dart';
import 'package:forestvpn_api/auth/authentication.dart';
import 'package:forestvpn_api/auth/http_basic_auth.dart';
import 'package:forestvpn_api/auth/http_bearer_auth.dart';
import 'package:forestvpn_api/auth/oauth.dart';
import 'package:forestvpn_api/model/android_device_info.dart';
import 'package:forestvpn_api/model/android_device_info_version.dart';
import 'package:forestvpn_api/model/apple_verify_receipt_request.dart';
import 'package:forestvpn_api/model/country.dart';
import 'package:forestvpn_api/model/error.dart';
import 'package:forestvpn_api/model/geo_point.dart';
import 'package:forestvpn_api/model/google_play_purchase_verification_request.dart';
import 'package:forestvpn_api/model/ios_device_info.dart';
import 'package:forestvpn_api/model/ios_device_info_utsname.dart';
import 'package:forestvpn_api/model/location.dart';
import 'package:forestvpn_api/model/preference.dart';
import 'package:forestvpn_api/model/preference_update_request.dart';
import 'package:forestvpn_api/model/premium.dart';
import 'package:forestvpn_api/model/usage_traffic.dart';
import 'package:forestvpn_api/model/wire_guard_interface.dart';
import 'package:forestvpn_api/model/wire_guard_peer.dart';
import 'package:forestvpn_api/model/wire_guard_profile.dart';
import 'package:forestvpn_api/model/wire_guard_profile_create_request.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

We analyzed this package on May 23, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.1
  • pana: 0.13.8-dev

Health suggestions

Fix lib/model/android_device_info.dart. (-18.98 points)

Analysis of lib/model/android_device_info.dart reported 42 hints, including:

line 5 col 28: Don't explicitly initialize variables to null.

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 13 col 10: Don't explicitly initialize variables to null.

Fix lib/model/ios_device_info.dart. (-7.71 points)

Analysis of lib/model/ios_device_info.dart reported 16 hints, including:

line 5 col 10: Don't explicitly initialize variables to null.

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 13 col 10: Don't explicitly initialize variables to null.

Fix lib/model/android_device_info_version.dart. (-5.84 points)

Analysis of lib/model/android_device_info_version.dart reported 12 hints, including:

line 5 col 10: Don't explicitly initialize variables to null.

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 13 col 10: Don't explicitly initialize variables to null.

Fix additional 30 files with analysis or formatting issues. (-56.17 points)

Additional issues in the following files:

  • lib/model/ios_device_info_utsname.dart (10 hints)
  • lib/model/location.dart (10 hints)
  • lib/model/premium.dart (10 hints)
  • lib/model/wire_guard_peer.dart (9 hints)
  • lib/model/wire_guard_profile.dart (9 hints)
  • lib/model/country.dart (8 hints)
  • lib/model/google_play_purchase_verification_request.dart (8 hints)
  • lib/model/wire_guard_profile_create_request.dart (8 hints)
  • lib/model/wire_guard_interface.dart (7 hints)
  • lib/api/wireguard_api.dart (4 hints)
  • lib/model/error.dart (4 hints)
  • lib/model/geo_point.dart (4 hints)
  • lib/model/preference.dart (4 hints)
  • lib/model/usage_traffic.dart (4 hints)
  • lib/api/user_api.dart (3 hints)
  • lib/api/geo_api.dart (2 hints)
  • lib/api_helper.dart (2 hints)
  • lib/model/apple_verify_receipt_request.dart (2 hints)
  • lib/model/preference_update_request.dart (2 hints)
  • lib/api/apple_api.dart (1 hint)
  • lib/api/google_api.dart (1 hint)
  • lib/api/usage_api.dart (1 hint)
  • lib/auth/http_bearer_auth.dart (1 hint)
  • lib/api.dart (Run dartfmt to format lib/api.dart.)
  • lib/api_client.dart (Run dartfmt to format lib/api_client.dart.)
  • lib/api_exception.dart (Run dartfmt to format lib/api_exception.dart.)
  • lib/auth/api_key_auth.dart (Run dartfmt to format lib/auth/api_key_auth.dart.)
  • lib/auth/authentication.dart (Run dartfmt to format lib/auth/authentication.dart.)
  • lib/auth/http_basic_auth.dart (Run dartfmt to format lib/auth/http_basic_auth.dart.)
  • lib/auth/oauth.dart (Run dartfmt to format lib/auth/oauth.dart.)

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://www.forestvpn.com/ was unreachable.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and forestvpn_api.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http >=0.12.0 <0.13.0 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.3.0