Skip to content

Commit

Permalink
rename package from pexae to pex (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanbujnak authored Sep 7, 2023
1 parent 1778a3f commit 6ec4c52
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion 000init.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pexae
package pex

// This file is deliberately named like this so that it's first compiled and
// first executed because it performs version checks to make sure these
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[![docs](https://img.shields.io/badge/docs-reference-blue.svg)](https://docs.ae.pex.com/go/)
[![docs](https://img.shields.io/badge/docs-reference-blue.svg)](https://docs.search.pex.com/go/)
[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/)

# Attribution Engine SDK for Golang
# Pex SDK for Golang

Go bindings for the [Attribution Engine SDK](https://docs.ae.pex.com).
Go bindings for the [Pex SDK](https://docs.search.pex.com).

### Installation

You can install the Go language bindings like this:

go get github.com/Pexeso/ae-sdk-go/v3
go get github.com/Pexeso/pex-sdk-go/v4


### Usage examples
Expand Down
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #cgo pkg-config: pexae
// #include <pex/ae/sdk/init.h>
// #include <pex/ae/sdk/lock.h>
// #include <pex/ae/sdk/client.h>
Expand Down
2 changes: 1 addition & 1 deletion common.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

import "encoding/json"

Expand Down
22 changes: 11 additions & 11 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

// Package pexae contains the Go bindings for the Attribution Engine's SDK.
// Package pex contains the Go bindings for the Pex SDK.
//
// Important! Please make sure to install the core library, as described in the
// following link: https://docs.ae.pex.com/installation/, before trying to use
// following link: https://docs.search.pex.com/installation/, before trying to use
// the Go bindings.
//
// # Installation
//
// You can install the Go language bindings like this:
//
// go get github.com/Pexeso/ae-sdk-go/v3
// go get github.com/Pexeso/pex-sdk-go/v4
//
// # Client
//
// Before you can do any operation with the SDK you need to initialize a client.
//
// client, err := pexae.NewClient(clientID, clientSecret)
// client, err := pex.NewClient(clientID, clientSecret)
// if err != nil {
// panic(err)
// }
// defer client.Close()
//
// If you want to test the SDK using the mockserver you need to mock the client:
//
// if err := pexae.MockClient(client); err != nil {
// if err := pex.MockClient(client); err != nil {
// panic(err)
// }
//
Expand All @@ -46,16 +46,16 @@
//
// b, _ := ioutil.ReadFile("/path/to/file.mp4")
//
// ft, err := pexae.FingerprintBuffer(b)
// ft, err := pex.FingerprintBuffer(b)
// if err != nil {
// panic(err)
// }
//
// If you only want to use certain types of fingerprinting, you can
// specify that as well:
//
// ft1, _ := client.FingerprintFileForTypes("/path/to/file.mp4", pexae.FingerprintTypeAudio)
// ft2, _ := client.FingerprintBufferForTypes(b, pexae.FingerprintTypeVideo|pexae.FingerprintTypeMelody)
// ft1, _ := client.FingerprintFileForTypes("/path/to/file.mp4", pex.FingerprintTypeAudio)
// ft2, _ := client.FingerprintBufferForTypes(b, pex.FingerprintTypeVideo|pex.FingerprintTypeMelody)
//
// Both the files and the memory buffers must be valid media content in
// following formats:
Expand All @@ -71,7 +71,7 @@
// After the fingerprint is generated, you can use it to perform a metadata search.
//
// // Build the request.
// req := &pexae.MetadataSearchRequest{
// req := &pex.MetadataSearchRequest{
// Fingerprint: ft,
// }
//
Expand Down Expand Up @@ -99,7 +99,7 @@
// // ...
//
// // Build the request.
// req := &pexae.LicenseSearchRequest{
// req := &pex.LicenseSearchRequest{
// Fingerprint: ft,
// }
//
Expand All @@ -114,4 +114,4 @@
// The most significant difference between the searches currently is in the
// results they return. See MetadataSearchResult and LicenseSearchResult for
// more information.
package pexae
package pex
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #include <pex/ae/sdk/status.h>
import "C"
Expand Down
8 changes: 4 additions & 4 deletions examples/pexsearch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

pexae "github.com/Pexeso/ae-sdk-go/v3"
pex "github.com/Pexeso/ae-sdk-go/v4"
)

const (
Expand All @@ -15,7 +15,7 @@ const (

func main() {
// Initialize and authenticate the client.
client, err := pexae.NewPexSearchClient(clientID, clientSecret)
client, err := pex.NewPexSearchClient(clientID, clientSecret)
if err != nil {
panic(err)
}
Expand All @@ -24,7 +24,7 @@ func main() {
// Optionally mock the client. If a client is mocked, it will only communicate
// with the local mockserver instead of production servers. This is useful for
// testing.
if err := pexae.MockClient(client); err != nil {
if err := pex.MockClient(client); err != nil {
panic(err)
}

Expand All @@ -46,7 +46,7 @@ func main() {
}

// Build the request.
req := &pexae.PexSearchRequest{
req := &pex.PexSearchRequest{
Fingerprint: ft,
}

Expand Down
8 changes: 4 additions & 4 deletions examples/privatesearch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

pexae "github.com/Pexeso/ae-sdk-go/v3"
pex "github.com/Pexeso/ae-sdk-go/v4"
)

const (
Expand All @@ -15,7 +15,7 @@ const (

func main() {
// Initialize and authenticate the client.
client, err := pexae.NewPrivateSearchClient(clientID, clientSecret)
client, err := pex.NewPrivateSearchClient(clientID, clientSecret)
if err != nil {
panic(err)
}
Expand All @@ -24,7 +24,7 @@ func main() {
// Optionally mock the client. If a client is mocked, it will only communicate
// with the local mockserver instead of production servers. This is useful for
// testing.
if err := pexae.MockClient(client); err != nil {
if err := pex.MockClient(client); err != nil {
panic(err)
}

Expand All @@ -51,7 +51,7 @@ func main() {
}

// Build the request.
req := &pexae.PrivateSearchRequest{
req := &pex.PrivateSearchRequest{
Fingerprint: ft,
}

Expand Down
2 changes: 1 addition & 1 deletion fingerprint.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #include <stdlib.h>
// #include <pex/ae/sdk/lock.h>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/Pexeso/ae-sdk-go/v3
module github.com/Pexeso/pex-sdk-go/v4

go 1.19
2 changes: 1 addition & 1 deletion mockserver.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #include <pex/ae/sdk/lock.h>
// #include <pex/ae/sdk/mockserver.h>
Expand Down
4 changes: 2 additions & 2 deletions pex_search.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #include <pex/ae/sdk/asset.h>
// #include <pex/ae/sdk/lock.h>
Expand Down Expand Up @@ -165,7 +165,7 @@ func (x *PexSearchFuture) processResult(cResult *C.AE_CheckSearchResult, cStatus
}

// PexSearchClient serves as an entry point to all operations that
// communicate with the Attribution Engine backend service. It
// communicate with Pex backend services. It
// automatically handles the connection and authentication with the
// service.
type PexSearchClient struct {
Expand Down
4 changes: 2 additions & 2 deletions private_search.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Pexeso Inc. All rights reserved.

package pexae
package pex

// #include <pex/ae/sdk/lock.h>
// #include <pex/ae/sdk/client.h>
Expand Down Expand Up @@ -137,7 +137,7 @@ func (x *PrivateSearchFuture) processResult(cResult *C.AE_CheckSearchResult, cSt
}

// PrivateSearchClient serves as an entry point to all operations that
// communicate with the Attribution Engine backend service. It
// communicate with Pex backend services. It
// automatically handles the connection and authentication with the
// service.
type PrivateSearchClient struct {
Expand Down

0 comments on commit 6ec4c52

Please sign in to comment.