Go to file
densestvoid 31885d2726 First major code push
Preparing for version 0.1.0
Contains a real README, the test framework, and the API implementation
2020-07-29 22:20:57 -04:00
.gitignore Initial commit 2020-01-08 19:08:02 -05:00
blocks_api_test.go First major code push 2020-07-29 22:20:57 -04:00
blocks_api.go First major code push 2020-07-29 22:20:57 -04:00
bots_api_test.go First major code push 2020-07-29 22:20:57 -04:00
bots_api.go First major code push 2020-07-29 22:20:57 -04:00
chats_api_test.go First major code push 2020-07-29 22:20:57 -04:00
chats_api.go First major code push 2020-07-29 22:20:57 -04:00
client_test.go First major code push 2020-07-29 22:20:57 -04:00
client.go First major code push 2020-07-29 22:20:57 -04:00
data_types_test.go First major code push 2020-07-29 22:20:57 -04:00
data_types.go First major code push 2020-07-29 22:20:57 -04:00
direct_messages_api_test.go First major code push 2020-07-29 22:20:57 -04:00
direct_messages_api.go First major code push 2020-07-29 22:20:57 -04:00
go.mod First major code push 2020-07-29 22:20:57 -04:00
go.sum First major code push 2020-07-29 22:20:57 -04:00
groups_api_test.go First major code push 2020-07-29 22:20:57 -04:00
groups_api.go First major code push 2020-07-29 22:20:57 -04:00
json_test.go First major code push 2020-07-29 22:20:57 -04:00
json.go First major code push 2020-07-29 22:20:57 -04:00
leaderboard_api_test.go First major code push 2020-07-29 22:20:57 -04:00
leaderboard_api.go First major code push 2020-07-29 22:20:57 -04:00
LICENSE Initial commit 2020-01-08 19:08:02 -05:00
likes_api_test.go First major code push 2020-07-29 22:20:57 -04:00
likes_api.go First major code push 2020-07-29 22:20:57 -04:00
main_test.go First major code push 2020-07-29 22:20:57 -04:00
members_api_test.go First major code push 2020-07-29 22:20:57 -04:00
members_api.go First major code push 2020-07-29 22:20:57 -04:00
messages_api_test.go First major code push 2020-07-29 22:20:57 -04:00
messages_api.go First major code push 2020-07-29 22:20:57 -04:00
README.md First major code push 2020-07-29 22:20:57 -04:00
sms_mode_api_test.go First major code push 2020-07-29 22:20:57 -04:00
sms_mode_api.go First major code push 2020-07-29 22:20:57 -04:00
users_api_test.go First major code push 2020-07-29 22:20:57 -04:00
users_api.go First major code push 2020-07-29 22:20:57 -04:00

Version 1.0 Release Date: TBD

I would like to add common helper functions/features inspired by the package use in the community. So please, especially before Version 1.0 release, let me know what you would like to see added to the package, but bear in mind the main objective to be a simple wrapper for the API exposed by the GroupMe team.


GroupMe API Wrapper

Description

The design of this package is meant to be super simple. Wrap the exposed API endpoints documented by the GroupMe team. While you can achieve the core of this package with cURL, there are some small added features, coupled along with a modern language, that should simplify writing GroupMe bots and applications.

[FUTURE] In addition to the Go package, there is also a CLI application built using this package; all the features are available from the command line.

Why?

I enjoy programming, I use GroupMe with friends, and I wanted to write a fun add-on application for our group. I happened to start using Go around this time, so it was good practice.

Example

package main

import (
    "fmt"

    "github.com/densestvoid/groupme"
)

// This is not a real token. Please find yours by logging
// into the GroupMe development website: https://dev.groupme.com/
const authorizationToken = "0123456789ABCDEF"


// A short program that gets the gets the first 5 groups
// the user is part of, and then the first 10 messages of
// the first group in that list
func main() {
    // Create a new client with your auth token
    client := groupme.NewClient(authorizationToken)

    // Get the groups your user is part of
    groups, err := client.IndexGroups(&GroupsQuery{
        Page: 0,
        PerPage: 5,
        Omit: "memberships",
    })

    if err != nil {
        fmt.Println(err)
        return
    }

    fmt.Println(groups)

    // Get first 10 messages of the first group
    if len(groups) <= 0 {
        fmt.Println("No groups")
    }

    messages, err := client.IndexMessages(groups[0].ID, &IndexMessagesQuery{
        Limit: 10,
    })

    if err != nil {
        fmt.Println(err)
    }

    fmt.Println(messages)
}

Installation

Go Package

go get github.com/densestvoid/groupme

[FUTURE] CLI

Contribute

I find the hours I can spend developing personal projects decreasing every year, so I welcome any help I can get. Feel free to tackle any open issues, or if a feature request catches your eye, feel free to reach out to me and we can discuss adding it to the package. However, once version 1.0 is released, I don't foresee much work happening on this project unless the GroupMe API is updated.

Credits

All credits for the actual platform belong to the GroupMe team; I only used the exposed API they wrote.

License

GPL-3.0 License © DensestVoid