Skip to content

Commit

Permalink
格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMengXinX committed Apr 10, 2022
1 parent 673cbde commit 7dee5f5
Show file tree
Hide file tree
Showing 41 changed files with 51 additions and 10 deletions.
3 changes: 2 additions & 1 deletion api/Batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package api

import (
"encoding/json"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
"net/http"

"github.com/XiaoMengXinX/Music163Api-Go/utils"
)

// Batch 批处理 APi
Expand Down
1 change: 1 addition & 0 deletions api/Comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/Search.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/Upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/albumDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
9 changes: 5 additions & 4 deletions api/artistHomepage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)

// ArtistHomepageAPI 获取歌手详情API
// ArtistHomepageAPI 获取歌手主页API
const ArtistHomepageAPI = "/api/personal/home/page/artist"

// ArtistHomepageReq 获取歌手详情API 的 body json
// ArtistHomepageReq 获取歌手主页API 的 body json
type ArtistHomepageReq struct {
ArtistId int64 `json:"artistId"`
}

// CreateArtistHomepageReqJson 创建获取歌手详情API 的 body json
// CreateArtistHomepageReqJson 创建获取歌手主页API 的 body json
func CreateArtistHomepageReqJson(artistId int64) string {
reqBody := ArtistHomepageReq{
ArtistId: artistId,
Expand All @@ -23,7 +24,7 @@ func CreateArtistHomepageReqJson(artistId int64) string {
return string(reqBodyJson)
}

// GetArtistHomepage 获取歌手详情
// GetArtistHomepage 获取歌手主页
func GetArtistHomepage(data utils.RequestData, artistID int64) (result types.ArtistHomepageData, err error) {
var options utils.EapiOption
options.Path = ArtistHomepageAPI
Expand Down
1 change: 1 addition & 0 deletions api/circleGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/cloudbeanNum.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/eventDelete.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
3 changes: 2 additions & 1 deletion api/eventSend.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package api

import (
"encoding/json"
"strings"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
"github.com/google/uuid"
"strings"
)

// SendEventAPI 发送动态 API
Expand Down
1 change: 1 addition & 0 deletions api/loginStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/mlogSend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/msgSend.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/musicianSign.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/musicianTasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
3 changes: 2 additions & 1 deletion api/nosToken.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"crypto/md5"
"encoding/json"
"fmt"
"path"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
"path"
)

// NosTokenAPI 获取 NosToken API (用于文件上传)
Expand Down
1 change: 1 addition & 0 deletions api/obtainCloudbean.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/playlisTracks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/playlistDelete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
5 changes: 3 additions & 2 deletions api/playlistDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand All @@ -12,7 +13,7 @@ const PlaylistDetailAPI = "/api/v6/playlist/detail"

// PlaylistDetailReq PlaylistDetail API 的 body json
type playlistDetailReq struct {
Id string `json:"id"`
ID string `json:"id"`
T string `json:"t"`
N string `json:"n"`
S string `json:"s"`
Expand All @@ -21,7 +22,7 @@ type playlistDetailReq struct {
// CreatePlaylistDetailReqJson 创建 获取歌单 请求json
func CreatePlaylistDetailReqJson(id int) string {
reqBody := playlistDetailReq{
Id: fmt.Sprintf("%d", id),
ID: fmt.Sprintf("%d", id),
T: "0",
N: "50",
S: "5",
Expand Down
1 change: 1 addition & 0 deletions api/playlistGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/playlistNew.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
3 changes: 2 additions & 1 deletion api/qrCheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package api

import (
"encoding/json"
"net/http"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
"net/http"
)

// QrLoginAPI 检查 QR 登录状态 API
Expand Down
1 change: 1 addition & 0 deletions api/qrUnikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/recommendSongs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/shortURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/songDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/songDownloadURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/songLike.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/songLyric.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/songURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/userDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"fmt"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/userInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/userSetting.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/userSign.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/userStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/vipGrowthpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/vipInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/vipTaskReward.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/vipTaskRewardtAll.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down
1 change: 1 addition & 0 deletions api/vipTasksList.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"

"github.com/XiaoMengXinX/Music163Api-Go/types"
"github.com/XiaoMengXinX/Music163Api-Go/utils"
)
Expand Down

0 comments on commit 7dee5f5

Please sign in to comment.