Skip to content

Commit

Permalink
files.list
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Apr 26, 2024
1 parent 8b4dc51 commit eb325a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions files.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ type FileUploadParameters struct {
type GetFilesParameters struct {
User string
Channel string
TeamID string
TimestampFrom JSONTime
TimestampTo JSONTime
Types string
Expand All @@ -142,6 +143,7 @@ type ListFilesParameters struct {
Limit int
User string
Channel string
TeamID string
Types string
Cursor string
}
Expand Down Expand Up @@ -281,6 +283,9 @@ func (api *Client) GetFilesContext(ctx context.Context, params GetFilesParameter
if params.Channel != DEFAULT_FILES_CHANNEL {
values.Add("channel", params.Channel)
}
if params.TeamID != "" {
values.Add("team_id", params.TeamID)
}
if params.TimestampFrom != DEFAULT_FILES_TS_FROM {
values.Add("ts_from", strconv.FormatInt(int64(params.TimestampFrom), 10))
}
Expand Down Expand Up @@ -326,6 +331,9 @@ func (api *Client) ListFilesContext(ctx context.Context, params ListFilesParamet
if params.Channel != DEFAULT_FILES_CHANNEL {
values.Add("channel", params.Channel)
}
if params.TeamID != "" {
values.Add("team_id", params.TeamID)
}
if params.Limit != DEFAULT_FILES_COUNT {
values.Add("limit", strconv.Itoa(params.Limit))
}
Expand Down

0 comments on commit eb325a5

Please sign in to comment.