vkwrapper

package
v0.0.0-...-47bc4e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestName  = "mock"
	TestID    = 123
	TestAlbum = PhotoAlbum{
		ID:      TestID,
		OwnerID: TestID,
		Size:    666,
		Title:   TestName,
	}
)

Functions

This section is empty.

Types

type MockVKWrapper

type MockVKWrapper struct {
	mock.Mock
}

func (*MockVKWrapper) CreateAlbum

func (m *MockVKWrapper) CreateAlbum(title string) PhotoAlbum

func (*MockVKWrapper) GetAlbums

func (m *MockVKWrapper) GetAlbums(userID int, NeedSystem bool) []PhotoAlbum

func (*MockVKWrapper) GetAlbumsByAlbumIds

func (m *MockVKWrapper) GetAlbumsByAlbumIds(albumIDs []int) []PhotoAlbum

func (*MockVKWrapper) GetPhotoURLs

func (m *MockVKWrapper) GetPhotoURLs(album PhotoAlbum, offset int) []string

func (*MockVKWrapper) GetUploadServer

func (m *MockVKWrapper) GetUploadServer(id int) string

func (*MockVKWrapper) PhotosSave

func (m *MockVKWrapper) PhotosSave(_ []byte, albumId int) error

type PhotoAlbum

type PhotoAlbum struct {
	ID      int
	OwnerID int
	Size    int
	Title   string
}

type VKWrapper

type VKWrapper interface {
	GetPhotoURLs(album PhotoAlbum, offset int) []string
	GetAlbums(userID int, NeedSystem bool) []PhotoAlbum
	GetAlbumsByAlbumIds(albumIDs []int) []PhotoAlbum
	CreateAlbum(title string) PhotoAlbum
	GetUploadServer(id int) string
	PhotosSave(body []byte, albumId int) error
}

type VkAPIWrapper

type VkAPIWrapper struct {
	// contains filtered or unexported fields
}

func NewVKWrapper

func NewVKWrapper() *VkAPIWrapper

func (*VkAPIWrapper) CreateAlbum

func (vkw *VkAPIWrapper) CreateAlbum(title string) PhotoAlbum

func (*VkAPIWrapper) GetAlbums

func (vkw *VkAPIWrapper) GetAlbums(userID int, NeedSystem bool) []PhotoAlbum

func (*VkAPIWrapper) GetAlbumsByAlbumIds

func (vkw *VkAPIWrapper) GetAlbumsByAlbumIds(albumIDs []int) []PhotoAlbum

func (*VkAPIWrapper) GetPhotoURLs

func (vkw *VkAPIWrapper) GetPhotoURLs(album PhotoAlbum, offset int) []string

func (*VkAPIWrapper) GetUploadServer

func (vkw *VkAPIWrapper) GetUploadServer(id int) string

func (*VkAPIWrapper) PhotosSave

func (vkw *VkAPIWrapper) PhotosSave(body []byte, albumId int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL