Skip to content

Commit

Permalink
this package should actually have a v3 suffix
Browse files Browse the repository at this point in the history
Signed-off-by: Sandy <[email protected]>
  • Loading branch information
thecsw committed Jul 23, 2024
1 parent 6ec8b5a commit 303effb
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 33 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<div id='badges' align='center'>

[![Go Report Card](https://goreportcard.com/badge/github.com/thecsw/mira)](https://goreportcard.com/report/github.com/thecsw/mira)
[![GoDoc](https://godoc.org/github.com/thecsw/mira?status.svg)](https://godoc.org/github.com/thecsw/mira)
[![Go Report Card](https://goreportcard.com/badge/github.com/thecsw/mira/v3)](https://goreportcard.com/report/github.com/thecsw/mira/v3)
[![GoDoc](https://godoc.org/github.com/thecsw/mira/v3?status.svg)](https://godoc.org/github.com/thecsw/mira/v3)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

</div>

For full documentation, please see the [Godoc page](https://godoc.org/github.com/thecsw/mira)
For full documentation, please see the [Godoc page](https://godoc.org/github.com/thecsw/mira/v3)

*mira* is a Reddit Api Wrapper written in beautiful Go. Featured in issue [306](https://golangweekly.com/issues/306) of Golang Weekly 🚀

Expand Down Expand Up @@ -150,7 +150,7 @@ package main
import (
"fmt"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

// Error checking is omitted for brevity
Expand Down Expand Up @@ -185,7 +185,7 @@ We can also send a message to another user!
package main

import (
"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand All @@ -206,7 +206,7 @@ package main
import (
"fmt"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand All @@ -232,7 +232,7 @@ package main
import (
"fmt"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// Submit submits a submission to a subreddit.
Expand Down
4 changes: 2 additions & 2 deletions comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strconv"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// Comments returns comments from a subreddit up to a specified limit sorted by the given parameters
Expand Down Expand Up @@ -37,7 +37,7 @@ func (c *Reddit) Comments(sort string, tdur string, limit int) ([]models.Comment

// CommentsAfter returns new comments from a subreddit
//
// Last is the anchor of a comment id
// # Last is the anchor of a comment id
//
// Limit is any numerical value, so 0 <= limit <= 100.
func (c *Reddit) CommentsAfter(sort string, last string, limit int) ([]models.Comment, error) {
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package mira is fantastic reddit api wrapper
//
// README at https://github.com/thecsw/mira
// README at https://github.com/thecsw/mira/v3
//
// All function docs here
package mira
2 changes: 1 addition & 1 deletion examples/comments/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

// Errors are omitted for brevity
Expand Down
2 changes: 1 addition & 1 deletion examples/composing/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/demo/reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
log "github.com/sirupsen/logrus"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/stream_comment_replies/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/stream_comments/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/stream_submissions/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/submissions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/thecsw/mira"
"github.com/thecsw/mira/v3"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/thecsw/mira
module github.com/thecsw/mira/v3

go 1.17
go 1.22

require (
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.3
)

require golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 // indirect
require golang.org/x/sys v0.22.0 // indirect
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -6,7 +7,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// Compose will send a message to next redditor.
Expand Down
4 changes: 2 additions & 2 deletions modqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"

"github.com/pkg/errors"
"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// ModQueue returns modqueue entries from a subreddit up to a specified limit sorted by the given parameters
Expand All @@ -24,7 +24,7 @@ func (c *Reddit) ModQueue(limit int) ([]models.ModQueueListingChild, error) {

// ModQueueAfter returns new modqueue entries from a subreddit
//
// Last is the anchor of a modqueue entry id
// # Last is the anchor of a modqueue entry id
//
// Limit is any numerical value, so 0 <= limit <= 100.
func (c *Reddit) ModQueueAfter(last string, limit int) ([]models.ModQueueListingChild, error) {
Expand Down
4 changes: 2 additions & 2 deletions reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// MiraRequest Reddit API is always developing and I can't implement all endpoints;
Expand All @@ -17,7 +17,7 @@ import (
//
// Here is the signature:
//
// func (c *Reddit) MiraRequest(method string, target string, payload map[string]string) ([]byte, error) {...}
// func (c *Reddit) MiraRequest(method string, target string, payload map[string]string) ([]byte, error) {...}
//
// It is pretty straight-forward, the return is a slice of bytes; Parse it yourself.
func (c *Reddit) MiraRequest(method string, target string, payload map[string]string) ([]byte, error) {
Expand Down
4 changes: 2 additions & 2 deletions reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/pkg/errors"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// Reports returns report entries from a subreddit up to a specified limit sorted by the given parameters
Expand All @@ -25,7 +25,7 @@ func (c *Reddit) Reports(limit int) ([]models.ReportListingChild, error) {

// ReportsAfter returns new report entries from a subreddit
//
// Last is the anchor of a modqueue entry id
// # Last is the anchor of a modqueue entry id
//
// Limit is any numerical value, so 0 <= limit <= 100.
func (c *Reddit) ReportsAfter(last string, limit int) ([]models.ReportListingChild, error) {
Expand Down
2 changes: 1 addition & 1 deletion streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mira
import (
"time"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// StreamCommentReplies streams comment replies
Expand Down
4 changes: 2 additions & 2 deletions submissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"regexp"
"strconv"

"github.com/thecsw/mira/models"
"github.com/thecsw/mira/v3/models"
)

// Submissions returns submissions from a subreddit up to a specified limit sorted by the given parameters
Expand All @@ -32,7 +32,7 @@ func (c *Reddit) Submissions(sort string, tdur string, limit int) ([]models.Post

// SubmissionsAfter returns new submissions from a subreddit
//
// Last is the anchor of a submission id
// # Last is the anchor of a submission id
//
// Limit is any numerical value, so 0 <= limit <= 100.
func (c *Reddit) SubmissionsAfter(last string, limit int) ([]models.PostListingChild, error) {
Expand Down

0 comments on commit 303effb

Please sign in to comment.