/urlslab-php-client

Primary LanguagePHPGNU General Public License v2.0GPL-2.0

OpenAPIClient-php

optimize your website with SEO

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/urlslab/urlslab-php-sdk.git"
    }
  ],
  "require": {
    "urlslab/urlslab-php-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: UrlslabApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-URLSLAB-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-URLSLAB-KEY', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\AnalyticsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$domain_data_retrieval_analytics_search_request = new \OpenAPI\Client\Model\DomainDataRetrievalAnalyticsSearchRequest(); // \OpenAPI\Client\Model\DomainDataRetrievalAnalyticsSearchRequest | Analytics request

try {
    $result = $apiInstance->getPageStats($domain_data_retrieval_analytics_search_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->getPageStats: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.urlslab.com

Class Method HTTP request Description
AnalyticsApi getPageStats POST /v1/analytics/page-stats Page Stats data from google search console
AnalyticsApi getSiteUrls GET /v1/analytics/site-urls Site URLs from GSC
AnalyticsApi getTopKeywords POST /v1/analytics/keywords Keyword Analytics data from google search console
ApikeyApi validate GET /v1/apikey/validate validate a given API Key
AuthApi getAuthIntegrations GET /v1/auth/integrations check if the user is already integrated to a specific integration
AuthApi getUserInfo GET /v1/auth/user-info get user info
AuthApi getUserSubscriptionDetail GET /v1/auth/user-sub get user subscription Detail
AuthApi logout POST /v1/auth/signout logout for users
AuthApi signin GET /v1/auth/signin/{provider} login for users
ChatbotApi createChatbot PUT /v1/chatbots Create chatbot
ChatbotApi createChatbotSession PUT /v1/chatbots/sessions/{userChatbotId} Create chatbot session
ChatbotApi deleteChatbot DELETE /v1/chatbots/{id} Delete chatbot
ChatbotApi deleteChatbotSession DELETE /v1/chatbots/sessions/{chatbotId}/{sessionId} Delete chatbot session
ChatbotApi getChatbot GET /v1/chatbots/{id} Get chatbot by id
ChatbotApi getChatbotSessionConversation GET /v1/chatbots/conversations/sessions/{chatbotId}/{sessionId} Get chatbot conversation
ChatbotApi getChatbotSessionSources GET /v1/chatbots/sessions/{chatbotId}/{sessionId}/sources Get chatbot session sources
ChatbotApi getChatbotSessions GET /v1/chatbots/conversations/ Get chatbot sessions
ChatbotApi getChatbotSessionsChart GET /v1/chatbots/conversations/chart Get chatbot sessions chart
ChatbotApi getChatbots GET /v1/chatbots Get chatbots for a user
ChatbotApi streamChatbotSession POST /v1/chatbots/sessions/{sessionId}/stream Stream Chatbot Session
ChatbotApi updateChatbot POST /v1/chatbots/{id} Update chatbot
ContentApi asyncMemoryLessAugment POST /v1/content/augment/async Async Augment based on the query and the given context
ContentApi complexAugment POST /v1/content/complex-augment/async Get Complex Async Augmentation result for multiple docs
ContentApi complexAugmentWithURLContext POST /v1/content/augment/process/create Augment based on given urls context
ContentApi getProcessResult GET /v1/content/augment/process/{id} Get Async Augmentation result
ContentApi getRelatedUrls POST /v1/content/related-urls Related Urls to a specific url
ContentApi memoryLessAugment POST /v1/content/augment Augment based on the query and the given context
CreditsApi getCreditEvents GET /v1/credits/events Fetching Latest Events of user credit
CreditsApi getCreditEventsAggregation GET /v1/credits/events/aggregation Fetching aggregated credit events
CreditsApi getLastCreditStatus GET /v1/credits Fetching Last Status of user credit
DocsApi addDocument PUT /v1/content/docs Add Custom Document
DocsApi deleteDocument DELETE /v1/content/docs/{id} Delete Document By Id
DocsApi getDocument GET /v1/content/docs/{id} Get Document By Id
DocsApi searchDocuments POST /v1/content/docs Get All Documents
DomainsApi getUserDomains GET /v1/domains Get Domains of a user
PublicAssetsApi loadCarouselThumbnail GET /v1/public/screenshot/thumbnail/carousel/{bucketId} Fetching thumbnail of carousel screenshot of url
PublicAssetsApi loadFullPageThumbnail GET /v1/public/screenshot/thumbnail/fullpage/{bucketId} Fetching thumbnail of fullpage screenshot of url
PublicAssetsApi loadImageCarousel GET /v1/public/screenshot/carousel/{bucketId} Fetching carousel screenshot of url
PublicAssetsApi loadOriginalImage GET /v1/public/screenshot/fullpage/{bucketId} Fetching fullpage screenshot of url
PublicAssetsApi loadTechnologyLogo GET /v1/public/technologies/logos/{iconName} Fetching icon logo of technology
ScheduleApi createSchedule PUT /v1/schedule create a new schedule
ScheduleApi deleteSchedule DELETE /v1/schedule/{id} delete a schedule
ScheduleApi getSchedule GET /v1/schedule/{id} get a specific schedule details
ScheduleApi listSchedules GET /v1/schedule get list of all schedules for the user
SerpApi bulkSearch POST /v1/serp/bulk/search Search the Serp to get top urls in bulk
SerpApi scheduleKeywordsAnalysis POST /v1/serp/bulk/search_volume Get Google Ads Search Analytics
SerpApi search POST /v1/serp/search Search the Serp to get top urls
SnapshotApi getSnapshots POST /v1/snapshot Get screenshot of url
SnapshotApi getSnapshotsHistory GET /v1/snapshot/history Get history of snapshot of url
SummaryApi getSummary POST /v1/summary Get summarization data for url
VideoApi getYTMicrodata POST /v1/content/video/yt/microdata/{ytVidId} get microdata for a youtube video
VideoApi getYTVidCaption POST /v1/content/video/yt/transcribe/{ytVidId} get transcript for a youtube video

Models

Authorization

UrlslabApiKeyAuth

  • Type: API key
  • API key parameter name: X-URLSLAB-KEY
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

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

  • API version: 1.0.0
    • Package version: 0.5.2
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen