go-postman-collection alternatives and similar packages
Based on the "Third-party APIs" category.
Alternatively, view go-postman-collection alternatives based on common mentions on social networks and blogs.
-
telegram-bot-api
Golang bindings for the Telegram Bot API -
goamz
Popular fork of goamz which adds some missing API calls to certain packages. -
webhooks
:fishing_pole_and_fish: Webhook receiver for GitHub, Bitbucket, GitLab, Gogs -
githubql
Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://docs.github.com/en/graphql). -
geo-golang
Go library to access geocoding and reverse geocoding APIs -
twitter-scraper
Scrape the Twitter Frontend API without authentication with Golang. -
hipchat (xmpp)
A golang package to communicate with HipChat over XMPP -
gostorm
GoStorm is a Go library that implements the communications protocol required to write Storm spouts and Bolts in Go that communicate with the Storm shells. -
lark
Feishu/Lark Open API Go SDK, Support ALL Open API and Event Callback. -
VK SDK for Golang
Golang module for working with VK API -
clarifai
DEPRECATED: please use https://github.com/Clarifai/clarifai-go-grpc -
go-trending
Go library for accessing trending repositories and developers at Github. -
hipchat
This project implements a Go client library for the Hipchat API. -
go-tgbot
Golang telegram bot API wrapper, session-based router and middleware -
cachet
Go(lang) client library for Cachet (open source status page system). -
gosip
⚡️ SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang) -
simples3
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK) -
go-lark
An easy-to-use SDK for Feishu and Lark Open Platform (Messaging API only) -
GoMusicBrainz
a Go (Golang) MusicBrainz WS2 client library - work in progress -
codeship-go
Go library for accessing the Codeship API v2 -
megos
Go(lang) client library for accessing information of an Apache Mesos cluster. -
fcm
Firebase Cloud Messaging for application servers implemented using the Go programming language.
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
Do you think we are missing an alternative of go-postman-collection or a related project?
README
go-postman-collection
Go module to work with Postman Collections.
This module aims to provide a simple way to work with Postman collections. Using this module, you can create collections, update them and export them into the Postman Collection format v2 (compatible with Insomnia)
Postman Collections are a group of saved requests you can organize into folders. For more information about Postman Collections, you can visit the official documentation.
Examples
Collections
Read a Postman Collection
package main
import (
"os"
postman "github.com/rbretecher/go-postman-collection"
)
func main() {
file, err := os.Open("postman_collection.json")
defer file.Close()
if err != nil {
panic(err)
}
c, err := postman.ParseCollection(file)
_ = c
}
Create and save a Postman Collection
package main
import (
"os"
postman "github.com/rbretecher/go-postman-collection"
)
func main() {
c := postman.CreateCollection("My collection", "My awesome collection")
c.AddItemGroup("A folder").AddItem(&postman.Item{
Name: "This is a request",
Request: Request{
URL: &URL{
Raw: "http://www.google.fr",
},
Method: postman.Get,
},
})
file, err := os.Create("postman_collection.json")
defer file.Close()
if err != nil {
panic(err)
}
err = c.Write(file)
if err != nil {
panic(err)
}
}
Items
Items
are the basic unit for a Postman collection, it can either be a request (Item
) or a folder (ItemGroup
).
// Create a simple item.
item := postman.CreateItem(postman.Item{
Name: "A basic request",
Request: Request{
URL: &URL{
Raw: "http://www.google.fr",
},
Method: postman.Get,
}
})
// Create a simple folder.
folder := postman.CreateItemGroup(postman.ItemGroup{
Name: "A folder",
})
// Add the item to the folder
folder.AddItem(item)
Request
Part of the Item
, a Request
represents an HTTP request.
// Basic request
req := Request{
URL: &URL{
Raw: "http://www.google.fr",
},
Method: postman.Get,
}
// Complex request
req := postman.Request{
URL: &postman.URL{
Raw: "http://www.google.fr",
},
Method: postman.Post,
Body: &postman.Body{
Mode: "raw",
Raw: "{\"key\": \"value\"}",
},
}
Auth
Auth
can be added to a Request
or an ItemGroup
.
// Create basic auth with username and password
auth := postman.CreateAuth(postman.Basic, postman.CreateAuthParam("username", "password"))
Variable
Variable
can be added to Collection
, Item
, ItemGroup
and URL
.
v := postman.CreateVariable("env", "prod")
Current support
For now, it does not offer support for Response
and Event
objects. Feel free to submit a pull request if you want to add support for one of those objects.
Object | v2.0.0 | v2.1.0 |
---|---|---|
Collection | Yes | Yes |
ItemGroup (Folder) | Yes | Yes |
Item | Yes | Yes |
Request | Yes | Yes |
Response | No | No |
Event | No | No |
Variable | Yes | Yes |
Auth | Yes | Yes |