mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-02 18:26:41 +00:00
Changed internal/ to utils/, allowing external imports
This commit is contained in:
parent
d5a3a0bd45
commit
be12849668
|
@ -6,7 +6,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/diamondburned/arikawa/api/rate"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,8 +2,8 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
)
|
||||
|
||||
const EndpointChannels = Endpoint + "channels/"
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
// EmojiAPI is a special format that the API wants.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/diamondburned/arikawa/discord" // for clarity
|
||||
d "github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
const EndpointGuilds = Endpoint + "guilds/"
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
const EndpointInvites = Endpoint + "invites/"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package api
|
||||
|
||||
import "github.com/diamondburned/arikawa/internal/httputil"
|
||||
import "github.com/diamondburned/arikawa/utils/httputil"
|
||||
|
||||
const (
|
||||
EndpointAuth = Endpoint + "auth/"
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
func (c *Client) Member(
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
// Messages gets all mesesages, automatically paginating. Use with care, as
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
// React adds a reaction to the message. This requires READ_MESSAGE_HISTORY (and
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
func (c *Client) AddRole(guildID, userID, roleID discord.Snowflake) error {
|
||||
|
|
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
)
|
||||
|
||||
const EndpointUsers = Endpoint + "users/"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/diamondburned/arikawa/discord"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/diamondburned/arikawa/api"
|
||||
"github.com/diamondburned/arikawa/internal/httputil"
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/internal/wsutil"
|
||||
"github.com/diamondburned/arikawa/utils/httputil"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
"github.com/diamondburned/arikawa/utils/wsutil"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/internal/wsutil"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
"github.com/diamondburned/arikawa/utils/wsutil"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
)
|
||||
|
||||
// Retries is the default attempts to retry if the API returns an error before
|
|
@ -4,7 +4,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
)
|
||||
|
||||
type RequestOption func(*http.Request) error
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
stderr "errors"
|
||||
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pkg/errors"
|
||||
)
|
|
@ -7,7 +7,7 @@ import (
|
|||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/diamondburned/arikawa/internal/json"
|
||||
"github.com/diamondburned/arikawa/utils/json"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/time/rate"
|
Loading…
Reference in a new issue