whatsapp-api-client-golang

Create a golang application with WhatsApp API

OTHER License

Stars
4
Committers
5

Bot releases are visible (Hide)

whatsapp-api-client-golang - Added partner methods Latest Release

Published by Amele9 7 months ago

Enhancements

  • Added documentation links

Features

  • Added partner methods

Example:

package main

import (
	"fmt"

	"github.com/green-api/whatsapp-api-client-golang/pkg/api"
)

func main() {
	Partner := api.GreenAPI{
		PartnerToken: "gac.37ea41ed00d74bc7a0899215312fed55bfd9bcd03a1e48",
	}

	response, err := Partner.Methods().Partner().CreateInstance(map[string]interface{}{
		"stateWebhook":    "yes",
		"incomingWebhook": "yes",
	})
	if err != nil {
		fmt.Println(err)
	}

	fmt.Println(response)
}

https://github.com/green-api/whatsapp-api-client-golang/blob/master/examples/createInstance/main.go

Dependencies

  • Bump golang.org/x/net from 0.19.0 to 0.22.0
whatsapp-api-client-golang - Fixed ReceiveNotification

Published by Amele9 10 months ago

Fixes

  • Fixed ReceiveNotification
whatsapp-api-client-golang - Fixed array methods

Published by Amele9 10 months ago

Fixes

  • Fixed GetChatHistory method
  • Fixed LastIncomingMessages method
  • Fixed LastOutgoingMessages method
  • Fixed ShowMessagesQueue method
  • Fixed GetContacts method
  • Fixed #13
whatsapp-api-client-golang - Added new methods

Published by Amele9 10 months ago

Fixes

  • Fixed docs

  • Fixed API method names

  • Updated MIMEType detection

  • Fixed #12

    Now all library errors will be returned to you. A channel for tracking errors in the GreenAPIWebhook structure has also been added.

    Example of error handling when receiving or deleting incoming notifications:

go func() {
    for {
        select {
        case err := <-GreenAPIWebhook.ErrorChannel:
            fmt.Println(err.Error())
        default:
            <-time.After(time.Second)
        }
    }
}()

Enhancements

  • Added workflows
  • Added dependabot

Features

  • Added SendPoll method (thanks to @Jibek100)
  • Added GetWaSettings method (thanks to @andreyMalyshkin)
  • Added GetAuthorizationCode method (thanks to @Jibek100)

Dependencies

whatsapp-api-client-golang - Fixed UploadFile

Published by Amele9 over 1 year ago

  • Fixed UploadFile
whatsapp-api-client-golang - Removed SetSystemProxy

Published by Amele9 over 1 year ago

  • Removed SetSystemProxy method
whatsapp-api-client-golang - Added UploadFile method

Published by Amele9 over 1 year ago

  • Added UploadFile method
whatsapp-api-client-golang - Fixed `import cycle not allowed`

Published by Amele9 over 1 year ago

  • Fixed import cycle not allowed
  • Example webhook has been updated
package main

import (
	"fmt"

	"github.com/green-api/whatsapp-api-client-golang/pkg/api"
-	"github.com/green-api/whatsapp-api-client-golang/pkg/webhook"
)

func main() {
	GreenAPI := api.GreenAPI{
		IDInstance:       "1101000001",
		APITokenInstance: "d75b3a66374942c5b3c019c698abc2067e151558acbd412345",
	}

-	GreenAPIWebhook := webhook.GreenAPIWebhook{
-		GreenAPI: GreenAPI,
-	}
+	GreenAPIWebhook := GreenAPI.Webhook()

	GreenAPIWebhook.Start(func(body map[string]interface{}) {
		fmt.Println(body)
	})
}
whatsapp-api-client-golang - Added webhook function

Published by Amele9 over 1 year ago

  • The examples have been updated
  • The docs have been updated
  • Added GreenAPI.Webhook function (You can use the Webhook structure directly from the GreenAPI structure)
whatsapp-api-client-golang - README and examples updates

Published by Amele9 over 1 year ago

  • The webhook example has been updated
  • The installation description has been updated
whatsapp-api-client-golang - Added ForwardMessages method

Published by ripreal almost 2 years ago

  • Added ForwardMessages method
Package Rankings
Top 8.56% on Proxy.golang.org
Related Projects