Skip to content

Commit

Permalink
fix: GroupsGroup.IsClosed type int
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Jan 25, 2020
1 parent e03c014 commit 6eeb598
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
23 changes: 23 additions & 0 deletions api/groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,29 @@ func TestVK_GroupsGetByID(t *testing.T) {
}
}

func TestVK_GroupsGetByID_private(t *testing.T) {
needGroupToken(t)

res, err := vkGroup.GroupsGetByID(api.Params{
"group_ids": "184580855",
"fields": "market,member_status,is_favorite,is_subscribed,city,country,verified,description,wiki_page,members_count,counters,cover,can_post,can_see_all_posts,activity,fixed_post,can_create_topic,can_upload_video,has_photo,status,main_album_id,links,contacts,site,main_section,trending,can_message,is_market_cart_enabled,is_messages_blocked,can_send_notify,online_status,start_date,finish_datef,age_limits,ban_info,action_button,author_id,phone,has_market_app,addresses,live_covers,is_adult,can_subscribe_posts,warning_notification,can_upload_doc,crop_photo,is_hidden_from_feed,place,public_date_label,wall",
})

noError(t, err)

if assert.NotEmpty(t, res[0]) {
group := res[0]
assert.NotEmpty(t, group.ID)
assert.NotEmpty(t, group.Name)
assert.NotEmpty(t, group.ScreenName)
assert.NotEmpty(t, group.IsClosed)
assert.NotEmpty(t, group.Type)
assert.NotEmpty(t, group.Photo50)
assert.NotEmpty(t, group.Photo100)
assert.NotEmpty(t, group.Photo200)
}
}

func TestVK_GroupsGetCatalog(t *testing.T) {
needUserToken(t)

Expand Down
8 changes: 4 additions & 4 deletions object/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ type GroupsGroup struct {
Type string `json:"type"`
Market GroupsMarketInfo `json:"market"`
MemberStatus int `json:"member_status"` // Current user's member status
IsClosed int `json:"is_closed"`
City BaseObject `json:"city"`
Country BaseCountry `json:"country"`
IsAdmin BaseBoolInt `json:"is_admin"` // Information whether current user is administrator
IsAdvertiser BaseBoolInt `json:"is_advertiser"` // Information whether current user is advertiser
IsClosed BaseBoolInt `json:"is_closed"`
IsAdmin BaseBoolInt `json:"is_admin"` // Information whether current user is administrator
IsAdvertiser BaseBoolInt `json:"is_advertiser"` // Information whether current user is advertiser
IsMember BaseBoolInt `json:"is_member"` // Information whether current user is member
IsFavorite BaseBoolInt `json:"is_favorite"` // Information whether community is in faves
IsAdult BaseBoolInt `json:"adult"` // Information whether community is adult
Expand Down Expand Up @@ -281,8 +281,8 @@ type GroupsGroupXtrInvitedBy struct {
Photo50 string `json:"photo_50"` // URL of square photo of the community with 50 pixels in width
ScreenName string `json:"screen_name"` // Domain of the community page
Type string `json:"type"`
IsClosed int `json:"is_closed"` // Information whether community is closed
IsAdmin BaseBoolInt `json:"is_admin"` // Information whether current user is manager
IsClosed BaseBoolInt `json:"is_closed"` // Information whether community is closed
IsMember BaseBoolInt `json:"is_member"` // Information whether current user is member
IsAdvertiser BaseBoolInt `json:"is_advertiser"` // Information whether current user is advertiser
}
Expand Down
1 change: 1 addition & 0 deletions object/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (user UsersUser) ToMention() string {
type UsersOnlineInfo struct {
AppID int `json:"app_id"`
LastSeen int `json:"last_seen"`
Status string `json:"string"`
Visible BaseBoolInt `json:"visible"`
IsOnline BaseBoolInt `json:"is_online"`
IsMobile BaseBoolInt `json:"is_mobile"`
Expand Down

0 comments on commit 6eeb598

Please sign in to comment.