Skip to content

ducksms/ducksms-go

Repository files navigation

Go API client for ducksms

Ducksms is a leading SMS messaging service provider offering one-way SMS communication services from your internet enabled computer. The API allow you to directly communicate and manage a SMS with our SMS gateway system.

Official API Documentation

https://docs.ducksms.com/developer/api-documentation

Installation

go get github.com/ducksms/ducksms-go

Getting Started

package main

import (
	"context"
	"fmt"

	ducksms "github.com/ducksms/ducksms-go/v1"
)

func main() {
	auth := context.WithValue(context.Background(), ducksms.ContextAPIKey, ducksms.APIKey{
		Key:    "YOUR_API_TOKEN",
		Prefix: "token",
	})

	cfg := ducksms.NewConfiguration()
	client := ducksms.NewAPIClient(cfg)

	var creditHistoryOpts ducksms.CreditHistoryOpts

	histories, apiResponse, err := client.CreditApi.CreditHistory(auth, &creditHistoryOpts)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Printf("%+v\n", histories)
		fmt.Printf("%+v\n", apiResponse) // &{Response:0xc00011ccf0 NextPage:2 FirstPage:1 LastPage:4 Rate:{Limit:1000 Remaining:998 Reset:2020-04-25 00:35:00 +0200 CEST}}
	}
}

Documentation for API Endpoints

All URIs are relative to https://ducksms.com

Class Method HTTP request Description
CreditApi CreditBalance Get /api/v1/credits/balance Credit Balance
CreditApi CreditHistory Get /api/v1/credits/history Credit History
SenderIDApi CreateSender Post /api/v1/senders Create a Sender ID
SenderIDApi DeleteSender Delete /api/v1/senders/{id} Delete a Sender ID
SenderIDApi GetSender Get /api/v1/senders/{id} Get a single Sender ID
SenderIDApi ListSender Get /api/v1/senders List Sender ID
SenderIDApi UpdateSender Post /api/v1/senders/{id} Update a Sender ID
SmsApi SmsSend Post /api/v1/sms/send Send Sms
SmsScheduleApi CancelSmsSchedule Delete /api/v1/sms/scheduled/{id} Cancel Sms Schedule
SmsScheduleApi ListSmsSchedule Get /api/v1/sms/scheduled List Sms Schedule

Documentation For Models

More Information

This API client was generated by the OpenAPI Generator project.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://ducksms.com/

Get help / support

Please contact support@ducksms.com and we can take more direct action toward finding a solution.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published