awin-go

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 0 Imported by: 0

README

Build Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

awin-go

Simple, yet powerful Awin go client to import data feeds into you projects.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. Getting Started
  2. Contributing
  3. License
  4. Contact
  5. Acknowledgments

About The Project

Golang Awin client for https://www.awin.com

Check the example folder to get started.

(back to top)

Getting Started

Prerequisites

You need to have an Awin account and your api key.

Awin Create A Feed

See their docs for more information.

Installation

awin-go supports 2 last Go versions and requires a Go version with modules support. So make sure to initialize a Go module:

go mod init github.com/my/repo

And then install awin-go:

go get github.com/matthiasbruns/awin-go

Quickstart

package main

import (
	"fmt"
	"github.com/matthiasbruns/awin-go/awin"
	"net/http"
)

func main() {
	awinClient := awin.NewAwinClient("apiKey", &http.Client{})

	fetchDataFeedList(awinClient)
	fetchDataFeed(awinClient)
}

func fetchDataFeedList(awinClient *awin.AwinClient) {
	feedList, err := awinClient.FetchDataFeedList()

	if err != nil {
		panic(err)
	}

	fmt.Println(feedList)
}

func fetchDataFeed(awinClient *awin.AwinClient) {
	feed, err := awinClient.FetchDataFeed(&awin.DataFeedOptions{
		FeedIds:          []string{"feedId1", "feedId2"},
		Language:         "en",
		ShowAdultContent: false,
	})

	if err != nil {
		panic(err)
	}

	fmt.Println(feed)
}


Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Matthias Bruns - @MTrax - git@matthiasbruns.com - Discord

Project Link: https://github.com/matthiasbruns/awin-go

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package awin In the awin package you will find all required functions and structs to communicate with the Awin.com services.
Package awin In the awin package you will find all required functions and structs to communicate with the Awin.com services.
example
cli Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL