GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — unifapi-sdk-go/docs/BrowserAPI.md at main · unifapi-agent/unifapi-sdk-go

Expand file tree

/

BrowserAPI.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
276 lines (172 loc) · 7.46 KB
/

BrowserAPI.md

Copy path

File metadata and controls

276 lines (172 loc) · 7.46 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

\BrowserAPI

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

Method HTTP request Description
BrowserHtmlPost Post /browser/html Render a page to HTML
BrowserLinksPost Post /browser/links Extract links from a page
BrowserMarkdownPost Post /browser/markdown Render a page to Markdown
BrowserScreenshotPost Post /browser/screenshot Capture a page screenshot

BrowserHtmlPost

BrowserHtmlPost200Response BrowserHtmlPost(ctx).BrowserHtmlRequest(browserHtmlRequest).Execute()

Render a page to HTML

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	browserHtmlRequest := *openapiclient.NewBrowserHtmlRequest("Url_example") // BrowserHtmlRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.BrowserAPI.BrowserHtmlPost(context.Background()).BrowserHtmlRequest(browserHtmlRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `BrowserAPI.BrowserHtmlPost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BrowserHtmlPost`: BrowserHtmlPost200Response
	fmt.Fprintf(os.Stdout, "Response from `BrowserAPI.BrowserHtmlPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBrowserHtmlPostRequest struct via the builder pattern

Name Type Description Notes
browserHtmlRequest BrowserHtmlRequest

Return type

BrowserHtmlPost200Response

Authorization

bearerAuth

HTTP request headers

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

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

BrowserLinksPost

BrowserLinksPost200Response BrowserLinksPost(ctx).BrowserLinksRequest(browserLinksRequest).Execute()

Extract links from a page

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	browserLinksRequest := *openapiclient.NewBrowserLinksRequest("Url_example") // BrowserLinksRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.BrowserAPI.BrowserLinksPost(context.Background()).BrowserLinksRequest(browserLinksRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `BrowserAPI.BrowserLinksPost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BrowserLinksPost`: BrowserLinksPost200Response
	fmt.Fprintf(os.Stdout, "Response from `BrowserAPI.BrowserLinksPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBrowserLinksPostRequest struct via the builder pattern

Name Type Description Notes
browserLinksRequest BrowserLinksRequest

Return type

BrowserLinksPost200Response

Authorization

bearerAuth

HTTP request headers

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

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

BrowserMarkdownPost

BrowserMarkdownPost200Response BrowserMarkdownPost(ctx).BrowserMarkdownRequest(browserMarkdownRequest).Execute()

Render a page to Markdown

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	browserMarkdownRequest := *openapiclient.NewBrowserMarkdownRequest("Url_example") // BrowserMarkdownRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.BrowserAPI.BrowserMarkdownPost(context.Background()).BrowserMarkdownRequest(browserMarkdownRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `BrowserAPI.BrowserMarkdownPost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BrowserMarkdownPost`: BrowserMarkdownPost200Response
	fmt.Fprintf(os.Stdout, "Response from `BrowserAPI.BrowserMarkdownPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBrowserMarkdownPostRequest struct via the builder pattern

Name Type Description Notes
browserMarkdownRequest BrowserMarkdownRequest

Return type

BrowserMarkdownPost200Response

Authorization

bearerAuth

HTTP request headers

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

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

BrowserScreenshotPost

BrowserScreenshotPost200Response BrowserScreenshotPost(ctx).BrowserScreenshotRequest(browserScreenshotRequest).Execute()

Capture a page screenshot

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/unifapi-agent/unifapi-sdk-go"
)

func main() {
	browserScreenshotRequest := *openapiclient.NewBrowserScreenshotRequest("Url_example") // BrowserScreenshotRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.BrowserAPI.BrowserScreenshotPost(context.Background()).BrowserScreenshotRequest(browserScreenshotRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `BrowserAPI.BrowserScreenshotPost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BrowserScreenshotPost`: BrowserScreenshotPost200Response
	fmt.Fprintf(os.Stdout, "Response from `BrowserAPI.BrowserScreenshotPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBrowserScreenshotPostRequest struct via the builder pattern

Name Type Description Notes
browserScreenshotRequest BrowserScreenshotRequest

Return type

BrowserScreenshotPost200Response

Authorization

bearerAuth

HTTP request headers

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

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

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.