Skip to content

Latest commit

 

History

History
231 lines (202 loc) · 31.4 KB

README.md

File metadata and controls

231 lines (202 loc) · 31.4 KB

Kotlin client library for ForestVPN API

ForestVPN - Fast, secure, and modern VPN. It offers Distributed Computing, Crypto Mining, P2P, Ad Blocking, TOR over VPN, 30+ locations, and a free version with unlimited data.

For more information, please visit https://forestvpn.com/

Requires

  • Kotlin 1.6.10
  • Gradle 7.5

Build

First, create the gradle wrapper script:

gradle wrapper

Then, run:

./gradlew check assemble

This runs all tests and packages the library.

Features/Implementation Notes

  • Supports JSON inputs/outputs, File inputs, and Form inputs.
  • Supports collection formats for query parameters: csv, tsv, ssv, pipes.
  • Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
  • Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets.

Documentation for API Endpoints

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

Class Method HTTP request Description
AdsForestVPNAPI createAdUnitRequestLog POST /ads/request-logs/ Create ad unit request log
AdsForestVPNAPI listAdPlacements GET /ads/placements/ Get ad placement list
AnalyticsForestVPNAPI getDataUsageStats GET /analytics/data-usage/ Data Usage Stats
AppForestVPNAPI getCurrentUserDevice GET /app/devices/current/ Get user device info
AppForestVPNAPI updateCurrentUserDevice PATCH /app/devices/current/ Update user device
AppleForestVPNAPI verifyAppStoreReceipt POST /purchase/apple/verify/ App store receipt verification
AuthForestVPNAPI loginToken POST /auth/token/login/ Login with JWT token
AuthForestVPNAPI migrateLegacyAuth GET /legacy/auth/ Legacy auth migration
AuthForestVPNAPI obtainToken GET /auth/token/obtain/ Obtain JWT token
AuthForestVPNAPI updateUserProfile PATCH /auth/profile/ Update profile
AuthForestVPNAPI userProfile GET /auth/profile/ Profile
AuthForestVPNAPI whoAmI GET /auth/whoami/ Who am I
BillingForestVPNAPI cancelSubscription DELETE /billing/subscriptions/{subscriptionID}/ Cancel subscription
BillingForestVPNAPI createPaymentMethodStripeSetupIntent POST /billing/payment-methods/stripe/setup-intents/ Create stripe's setup intent for add new payment method.
BillingForestVPNAPI createSubscription POST /billing/subscriptions/ Create subscription
BillingForestVPNAPI deletePaymentMethod DELETE /billing/payment-methods/{paymentMethodID}/ Delete payment method
BillingForestVPNAPI getBillingAccount GET /billing/account/ Billing account info
BillingForestVPNAPI getBillingBundle GET /billing/bundles/{bundleID}/ Bundle info
BillingForestVPNAPI getBillingPaymentOption GET /billing/payment-options/{paymentOptionID}/ Payment option info
BillingForestVPNAPI getBillingProduct GET /billing/products/{productID}/ Product info
BillingForestVPNAPI getPaymentMethod GET /billing/payment-methods/{paymentMethodID}/ Payment method info
BillingForestVPNAPI getSubscription GET /billing/subscriptions/{subscriptionID}/ Subscription info
BillingForestVPNAPI getSubscriptionItem GET /billing/subscription-items/{subscriptionItemID}/ Subscription item info
BillingForestVPNAPI listBillingBundles GET /billing/bundles/ Billing bundles list
BillingForestVPNAPI listBillingFeatures GET /billing/features/ Billing feature list
BillingForestVPNAPI listBillingPaymentOptions GET /billing/payment-options/ Billing payment option list
BillingForestVPNAPI listBillingProducts GET /billing/products/ Billing products list
BillingForestVPNAPI listPaymentMethods GET /billing/payment-methods/ Payment method list
BillingForestVPNAPI listSubscriptionItems GET /billing/subscription-items/ Subscription items list
BillingForestVPNAPI listSubscriptions GET /billing/subscriptions/ Billing subscriptions list
BillingForestVPNAPI reactivateSubscription POST /billing/subscriptions/{subscriptionID}/reactivate/ Reactivate subscription
BillingForestVPNAPI updateBillingAccount PATCH /billing/account/ Update billing account
BillingForestVPNAPI updateSubscriptionItem PATCH /billing/subscription-items/{subscriptionItemID}/ Update subscription item
CheckoutForestVPNAPI applyCouponCheckoutSession POST /checkout/sessions/{sessionID}/apply_coupon/ Apply coupon to session
CheckoutForestVPNAPI createCheckoutSession POST /checkout/sessions/ Create checkout session
CheckoutForestVPNAPI createWaitListRequest POST /checkout/wait-list/ Create request to add country in wait list
CheckoutForestVPNAPI expireCheckoutSession POST /checkout/sessions/{sessionID}/expire/ Expire checkout session
CheckoutForestVPNAPI getCheckoutSession GET /checkout/sessions/{sessionID}/ Checkout session details
CheckoutForestVPNAPI getStripeCheckoutSession GET /checkout/sessions/{sessionID}/stripe/checkout/session/ Stripe checkout session details
CheckoutForestVPNAPI getStripePaymentIntent GET /checkout/sessions/{sessionID}/stripe/payment/intent/ Stripe payment intent details
CheckoutForestVPNAPI processCloudPaymentsAuth POST /checkout/sessions/{sessionID}/cloud-payments/auth/ Cloud payments auth
CheckoutForestVPNAPI processCloudPaymentsPost3ds POST /checkout/sessions/{sessionID}/cloud-payments/post3ds/ Cloud payments post3ds
DeviceForestVPNAPI createDevice POST /devices/ Create new device
DeviceForestVPNAPI createDevicePortForwarding POST /devices/{deviceID}/port-forwarding/ Create new device port forwarding
DeviceForestVPNAPI deleteDevice DELETE /devices/{deviceID}/ Delete Device
DeviceForestVPNAPI deleteDevicePortForwarding DELETE /devices/{deviceID}/port-forwarding/{portForwardingID}/ Delete Device's Port Forwarding
DeviceForestVPNAPI getDevice GET /devices/{deviceID}/ Device Info
DeviceForestVPNAPI getDeviceStats GET /devices/{deviceID}/stats/{statsID}/ Device's stats detail
DeviceForestVPNAPI getDeviceWireGuard GET /devices/{deviceID}/wireguards/{wireGuardID}/ Device's wireguard profile detail
DeviceForestVPNAPI listDeviceBindings GET /devices/{deviceID}/bindings/ Device bindings
DeviceForestVPNAPI listDeviceConnectionModes GET /devices/{deviceID}/connection-modes/ Device connection modes
DeviceForestVPNAPI listDeviceDetailStats GET /devices/{deviceID}/detail-stats/ Device's detail stats list
DeviceForestVPNAPI listDevicePortForwardings GET /devices/{deviceID}/port-forwarding/ Device Port Forwarding List
DeviceForestVPNAPI listDeviceStats GET /devices/{deviceID}/stats/ Device's stats list
DeviceForestVPNAPI listDeviceWireGuardPeers GET /devices/{deviceID}/wireguards/{wireGuardID}/peers/ Device's wireguard peers
DeviceForestVPNAPI listDeviceWireGuards GET /devices/{deviceID}/wireguards/ Device's wireguard profiles list
DeviceForestVPNAPI listDevices GET /devices/ Device List
DeviceForestVPNAPI updateDevice PATCH /devices/{deviceID}/ Update device properties
DeviceForestVPNAPI updateDevicePortForwarding PATCH /devices/{deviceID}/port-forwarding/{portForwardingID}/ Update device's port forwarding
FcmForestVPNAPI createFCMDevice POST /notification/fcm/ Device registration for push notification through out Firebase Cloud Messaging
FcmForestVPNAPI deleteFCMDevice DELETE /notification/fcm/{registrationID}/ Delete fcm device
FcmForestVPNAPI getFCMDevice GET /notification/fcm/{registrationID}/ Device info
FcmForestVPNAPI updateFCMDevice PATCH /notification/fcm/{registrationID}/ Update device fcm properties
FriendshipForestVPNAPI acceptFriendshipInvitation PATCH /friendship/invitations/{code}/ Accept friendship invitation
FriendshipForestVPNAPI createFriendshipInvitation POST /friendship/invitations/ Create friendship invitation
FriendshipForestVPNAPI deleteFriend DELETE /friendship/friends/{id}/ Delete friend
FriendshipForestVPNAPI getFriend GET /friendship/friends/{id}/ Friend details
FriendshipForestVPNAPI getFriendshipInvitation GET /friendship/invitations/{code}/ Friendship invitation details
FriendshipForestVPNAPI listFriends GET /friendship/friends/ Get friends list
FriendshipForestVPNAPI rejectFriendshipInvitation DELETE /friendship/invitations/{code}/ Reject friendship invitation
GeoForestVPNAPI listCountries GET /geo/countries/ Countries list
GeoForestVPNAPI listCurrencies GET /geo/currencies/ Correncies list
GeoForestVPNAPI listLocations GET /locations/ Location list
GoogleForestVPNAPI verifyPlayStorePurchase POST /purchase/google/verify/ Play store purchase verification
NotificationsForestVPNAPI getNotificationsUnreadCount GET /notifications/unread_count/ Get unread notifications count
NotificationsForestVPNAPI listNotifications GET /notifications/all_list/ Get notifications list
NotificationsForestVPNAPI updateNotificationMarkRead GET /notifications/mark_read/{slug}/ Mark notification as read by user
NotificationsForestVPNAPI updateNotificationMarkReadAll GET /notifications/mark-all-as-read/ Mark all notifications as read by user
SupportForestVPNAPI createSupportTicket POST /support/tickets/ Create support ticket
SupportForestVPNAPI getSupportTicketCategory GET /support/ticket-categories/ Get ticket categories
WireguardForestVPNAPI getWireGuardPeerInfo GET /wireguard/peers/{pubKey}/ Wireguard peer info
WireguardForestVPNAPI listWireGuardPeers GET /wireguard/peers/ Wireguard peers list

Documentation for Models

Documentation for Authorization

bearerAuth

  • Type: HTTP basic authentication

wireguardAuth

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

Author