Documentation ¶
Index ¶
- Constants
- Variables
- func CallApyhub(method string, url string, body io.Reader, s ...string) ([]byte, error)
- func CallApyhubFromFile(key string, url string, input io.Reader, filename string) ([]byte, error)
- func CallApyhubFromJson(url string, byt []byte) ([]byte, error)
- func CheckDocumentExt(jsnbyt []byte) bool
- func CheckImageExt(jsnbyt []byte) bool
- func GetFileExt(byt []byte) string
- func PrepareBody(key string, input io.Reader, filename string) (*bytes.Buffer, *multipart.Writer, error)
- type BasicAuth
- type CalenderEvent
- type Chart
- type ContentRequest
- type Country
- type CountryListResponse
- type CountryResponse
- type Currency
- type CurrencyConverter
- type CurrencyList
- type CurrencyResponse
- type EmailRequest
- type ErrJsn
- type FuzzyRequest
- type FuzzyResponse
- type MetaResponse
- type PostRequest
- type Reccurent
- type Request
- type Response
- type SecureUnZip
- type StackedBarChart
- type StackedValue
- type Timezone
- type TimezoneResponse
- type UnZip
- type UnZipResponse
- type Values
- type VatRequest
- type Watermark
- type WatermarkRequest
- type WrongJsn
- type Zip
- type ZipSecure
Constants ¶
View Source
const ( // file convertion CsvUrltoExcelFile = "https://api.apyhub.com/convert/csv-url/excel-file" CsvUrltoExcelUrl = "https://api.apyhub.com/convert/csv-url/excel-url" CsvFiletoExcelFile = "https://api.apyhub.com/convert/csv-file/excel-file" CsvFiletoExcelUrl = "https://api.apyhub.com/convert/csv-file/excel-url" HtmlUrltoPdfFile = "https://api.apyhub.com/convert/html-url/pdf-file" HtmlUrltoPdfUrl = "https://api.apyhub.com/convert/html-url/pdf-url" HtmlFiletoPdfFile = "https://api.apyhub.com/convert/html-file/pdf-file" HtmlFiletoPdfUrl = "https://api.apyhub.com/convert/html-file/pdf-url" ImageUrltoPdfFile = "https://api.apyhub.com/convert/image-url/pdf-file" ImageUrltoPdfUrl = "https://api.apyhub.com/convert/image-url/pdf-url" ImagFiletoPdfFile = "https://api.apyhub.com/convert/image-file/pdf-file" ImageFiletoPdfUrl = "https://api.apyhub.com/convert/image-file/pdf-url" MdUrltoHtmlFile = "https://api.apyhub.com/convert/md-url/html-file" MdUrltoHtmlUrl = "https://api.apyhub.com/convert/md-url/html-url" MdFiletoHtmlFile = "https://api.apyhub.com/convert/md-file/html-file" MdFiletoHtmlUrl = "https://api.apyhub.com/convert/md-file/html-url" PresentationUrltoPdfFile = "https://api.apyhub.com/convert/presentation-url/pdf-file" PresentationUrltoPdfUrl = "https://api.apyhub.com/convert/presentation-url/pdf-url" PresentationFiletoPdfFile = "https://api.apyhub.com/convert/presentation-file/pdf-file" PresentationFiletoPdfUrl = "https://api.apyhub.com/convert/presentation-file/pdf-url" SpreadsheetUrltoPdfFile = "https://api.apyhub.com/convert/spreadsheet-url/pdf-file" SpreadsheetUrltoPdfUrl = "https://api.apyhub.com/convert/spreadsheet-url/pdf-url" SpreadsheetFiletoPdfFile = "https://api.apyhub.com/convert/spreadsheet-file/pdf-file" SpreadsheetFiletoPdfUrl = "https://api.apyhub.com/convert/spreadsheet-file/pdf-url" WordUrltoPdfFile = "https://api.apyhub.com/convert/word-url/pdf-file" WordUrltoPdfUrl = "https://api.apyhub.com/convert/word-url/pdf-url" WordFiletoPdfFile = "https://api.apyhub.com/convert/word-file/pdf-file" WordFiletoPdfUrl = "https://api.apyhub.com/convert/word-file/pdf-url" // image processing CompressImageUrlToFile = "https://api.apyhub.com/processor/image/compress/url/file" CompressImageUrlToUrl = "https://api.apyhub.com/processor/image/compress/file-urls" CompressImageFileToFile = "https://api.apyhub.com/processor/image/compress/file" CompressImageFileToUrl = "https://api.apyhub.com/processor/image/compress/file/url" WaterMarkImageUrlToFile = "https://api.apyhub.com/processor/image/watermark/url/file" WaterMarkImageUrlToUrl = "https://api.apyhub.com/processor/image/watermark/file-urls" WaterMarkImageFileToFile = "https://api.apyhub.com/processor/image/watermark/file" WaterMarkImageFileToUrl = "https://api.apyhub.com/processor/image/watermark/file/url" CropImageUrlToFile = "https://api.apyhub.com/processor/image/crop/url/file" CropImageUrlToUrl = "https://api.apyhub.com/processor/image/crop/file-urls" CropImageFileToFile = "https://api.apyhub.com/processor/image/crop/file" CropImageFileToUrl = "https://api.apyhub.com/processor/image/crop/file/url" ResizeImageUrlToFile = "https://api.apyhub.com/processor/image/resize/url/file" ResizeImageUrlToUrl = "https://api.apyhub.com/processor/image/resize/file-urls" ResizeImageFileToFile = "https://api.apyhub.com/processor/image/resize/file" ResizeImageFileToUrl = "https://api.apyhub.com/processor/image/resize/file/urls" ThumnailsImageUrlToFile = "https://api.apyhub.com/generate/image/thumbnail/url/file" ThumnailsImageUrlToUrl = "https://api.apyhub.com/generate/image/thumbnail/file-urls" ThumnailsImageFileToFile = "https://api.apyhub.com/generate/image/thumbnail/file" ThumnailsImageFileToUrl = "https://api.apyhub.com/generate/image/thumbnail/file/url" // validation VatValidate = "https://api.apyhub.com/validate/vat" INPostcodeValidate = "https://api.apyhub.com/validate/postcodes/in" UKPostcodeValidate = "https://api.apyhub.com/validate/postcodes/uk" EmailDNS = "https://api.apyhub.com/validate/email/dns" EmailAcadamic = "https://api.apyhub.com/validate/email/academic" // file-extraction TextFromWebpage = "https://api.apyhub.com/extract/text/webpage" TextFromWordUrl = "https://api.apyhub.com/extract/text/word-url" TextFromWordFile = "https://api.apyhub.com/extract/text/word-file" TextFromPdfUrl = "https://api.apyhub.com/extract/text/pdf-url" TextFromPdfFile = "https://api.apyhub.com/extract/text/pdf-file" ImageMetadataFromFile = "https://api.apyhub.com/processor/image/metadata/file" ImageMetadataFromUrl = "https://api.apyhub.com/processor/image/metadata/file-urls" FuzzySearch = "https://api.apyhub.com/search/text/fuzzy" // data CountryInfo = "https://api.apyhub.com/data/info/country" CountryList = "https://api.apyhub.com/data/dictionary/country" CurrenciesList = "https://api.apyhub.com/data/dictionary/currency" CurrencyConv = "https://api.apyhub.com/data/convert/currency" Timezones = "https://api.apyhub.com/data/dictionary/timezone" // generate BarChartFile = "https://api.apyhub.com/generate/charts/bar/file" BarChartUrl = "https://api.apyhub.com/generate/charts/bar/url" PieChartFile = "https://api.apyhub.com/generate/charts/pie/file" PieChartUrl = "https://api.apyhub.com/generate/charts/pie/url" StackedBarChartFile = "https://api.apyhub.com/generate/charts/stacked/file" StackedBarChartUrl = "https://api.apyhub.com/generate/charts/stacked/url" BarcodeAsFile = "https://api.apyhub.com/generate/barcode/file" BarcodeAsURL = "https://api.apyhub.com/generate/barcode/url" QrcodeAsFile = "https://api.apyhub.com/generate/qr-code/file" QrcodeAsURL = "https://api.apyhub.com/generate/qr-code/url" HtmlContentToPdfFile = "https://api.apyhub.com/generate/html-content/pdf-file" HtmlContentToPdfURL = "https://api.apyhub.com/generate/html-content/pdf-url" WebpageToPdfFile = "https://api.apyhub.com/generate/webpage/pdf-file" WebpageToPdfURL = "https://api.apyhub.com/generate/webpage/pdf-url" ScreenshotWebpageAsFile = "https://api.apyhub.com/generate/screenshot/webpage/image-file" ScreenshotWebpageAsURL = "https://api.apyhub.com/generate/screenshot/webpage/image-url" IcalAsFile = "https://api.apyhub.com/generate/ical/file" IcalAsURL = "https://api.apyhub.com/generate/ical/url" ArchiveURLToFile = "https://api.apyhub.com/generate/archive/file-urls/archive-file" ArchiveFileToFile = "https://api.apyhub.com/generate/archive/files/archive-file" ArchiveFileToURL = "https://api.apyhub.com/generate/archive/files/archive-url" ArchiveURLToURL = "https://api.apyhub.com/generate/archive/file-urls/archive-url" SecureArchiveURLToFile = "https://api.apyhub.com/generate/secure-archive/file-urls/archive-file" SecureArchiveFileToFile = "https://api.apyhub.com/generate/secure-archive/files/archive-file" SecureArchiveURLToURL = "https://api.apyhub.com/generate/secure-archive/file-urls/archive-url" SecureArchiveFileToURL = "https://api.apyhub.com/generate/secure-archive/files/archive-url" UnArchiveAsURLToURL = "https://api.apyhub.com/extract/archive/url/file-urls" UnArchiveFileToURL = "https://api.apyhub.com/extract/archive/file/file-urls" SecureUnArchiveURLToURL = "https://api.apyhub.com/extract/secure-archive/url/file-urls" SecureUnArchiveFileToURL = "https://api.apyhub.com/extract/secure-archive/file/file-urls" )
Variables ¶
View Source
var ( ErrTypeNotMatch = errors.New("type not matched") ErrInvalidFormat = errors.New("format of file submitted is invalid") ErrNotSameType = errors.New("image and watermark is not same type") ErrUnableToGetCurrency = errors.New("unable to get currency") ErrTokenNotSet = errors.New("authentication required") ErrNoArgs = errors.New("url or file required") ErrMixedType = errors.New("mixed type can't be allowed") )
View Source
var ContentType = func(contentType string) (string, string) { return "Content-Type", contentType }
View Source
var Token string
Functions ¶
func CallApyhub ¶
func CallApyhubFromFile ¶
Create Form File
func CallApyhubFromJson ¶
Call Apyhub
func CheckDocumentExt ¶
func CheckImageExt ¶
func GetFileExt ¶
Types ¶
type CalenderEvent ¶
type CalenderEvent struct { Summary string `json:"summary"` Description string `json:"description"` OrganizerEmail string `json:"organizer_email"` AttendeesEmails []string `json:"attendees_emails"` Location string `json:"location"` TimeZone string `json:"time_zone"` MeetingDate string `json:"meeting_date"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Reccuring bool `json:"recurring"` Recurrence Reccurent `json:"recurrence"` }
type Chart ¶
type Chart struct { Title string `json:"title"` Theme string `json:"theme"` Data []Values `json:"data"` }
Charts struct
type ContentRequest ¶
type ContentRequest struct {
Content string `json:"content"`
}
type CountryListResponse ¶
type CountryListResponse struct {
Data []Country `json:"data"`
}
type CurrencyConverter ¶
type CurrencyConverter struct { Source string `json:"source"` Target string `json:"target"` Date string `json:"date,omitempty"` }
currency struct
type CurrencyList ¶
type CurrencyList struct {
Data []Currency `json:"data"`
}
type CurrencyResponse ¶
type CurrencyResponse struct {
Data float64 `json:"data"`
}
type EmailRequest ¶
type EmailRequest struct {
Email string
}
type FuzzyRequest ¶
Fuzzy search
type FuzzyResponse ¶
type FuzzyResponse struct {
Data []string `json:"data"`
}
type MetaResponse ¶
type MetaResponse struct {
Data map[string]interface{} `json:"data"`
}
Metadata struct
type PostRequest ¶
type PostRequest struct {
Postcode string
}
type SecureUnZip ¶
type StackedBarChart ¶
type StackedBarChart struct { Title string `json:"title"` Theme string `json:"theme"` Data []StackedValue `json:"data"` }
type StackedValue ¶
type TimezoneResponse ¶
type TimezoneResponse struct {
Data []Timezone `json:"data"`
}
Timezone struct
type UnZipResponse ¶
type UnZipResponse struct {
Data []string `json:"data"`
}
type VatRequest ¶
type VatRequest struct {
Vat string
}
type WatermarkRequest ¶
Click to show internal directories.
Click to hide internal directories.