Download the PHP package freedomcore/vk-api without Composer
On this page you can find all versions of the php package freedomcore/vk-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download freedomcore/vk-api
More information about freedomcore/vk-api
Files in freedomcore/vk-api
Package vk-api
Short Description FreedomCore VK API Library
License CC-BY-SA
Homepage https://packages.freedomcore.ru/vk
Informations about the package vk-api
[PHP] FreedomCore VK API
A PHP VK API Client based on official VK API Documentation
Table of Contents
- Introduction
- Instructions
- Require this package with Composer
- Configuration
- Resources
- VKBase
- VKAccount
- VKDataStorage
- VKDocuments
- VKGroups
- VKUsers
Introduction
This is a pure PHP implementation of VK API Client library. It can be easy extended by adding additional resource classes to API folder.
Pros:
- Can authorize users with specific scope
- Can check for required scope before executing API call
- Works with: Users, Groups, DataStorage, Account and Documents APIs
- Easy to modify
- Easy to use
This code is available on Github. Pull requests are welcome.
Require this package with Composer
Install this package through Composer.
Edit your project's composer.json
file to require
freedomcore/vk-api
.
Create composer.json file
and run composer update
or
run this command in your command line:
Configuration
-
Create New Object
a. To work with Library before authorization completedb. To work with Library after authorization completed
-
How to authorize user
a. Generate Authorization Linkb. Get Access Token By Using Key From Callback
c. Check, if user authorized
- Now you can work with API
Resources
VKBase Resource
This is the main Library resource
There are 4 API Methods presented in this Resource:
-
- Set API Version Provided By User
-
- Returns Authorization Link With Passed Parameters
-
- Returns Access Token From Authorization Link
-
- Returns User Authorization Status
VKAccount Resource
This Resource allows you to get user related data
How to use:
Initialize New VKAccount object:
Now you can call methods, e.g.
There are 6 API Methods presented in this Resource:
-
- Fetches all counters which are greater than zero (messages, videos, friends, etc)
-
- Creates Sidebar Link to application, if user allowed it
-
- Sets status to Online for 15 minutes
-
- Sets status to Offline
-
- Returns a list of active ads (offers)
-
- Gets settings of the current user in this application
VKDataStorage Resource
Missing Description
There are 3 API Methods presented in this Resource:
-
- Returns a value of variable with the name set by key parameter
-
- Saves a value of variable with the name set by key parameter
-
- Returns the names of all variables
VKDocuments Resource
Attention: This Resourse is incomplete | There are 7 more methods to be added
This Resource allows you to work with documents which are belong to user/group
How to use:
Initialize New VKDocuments object:
Now you can call methods, e.g.
There are 3 API Methods presented in this Resource:
-
- Returns detailed information about user or community documents
-
- Returns information about documents by their IDs
-
- Returns the server address for document upload
VKGroups Resource
How to use:
This Resource allows you to manage groups and work with them
Initialize New VKGroups object:
Now you can call methods, e.g.
There are 19 API Methods presented in this Resource:
-
- Returns information specifying whether a user is a member of a community
-
- Returns information about communities by their ID (IDs)
-
- Returns a list of the communities to which a user belongs
-
- Returns a list of community members
-
- With this method you can join the group or public page, and also confirm your participation in an event.
-
- With this method you can leave a group, public page, or event.
-
- Searches for communities by substring.
-
- Returns a list of invitations to join communities and events.
-
- Returns invited users list of a community (Requires Moderator Status)
-
- Adds a user to a community blacklist (Requires Moderator Status)
-
- Deletes a user from a community blacklist (Requires Moderator Status)
-
- Returns a list of users on a community blacklist (Requires Moderator Status)
-
- Creates a new community
-
- Edits a community (THIS METHOD INCOMPLETE)
-
- Get Group Settings
-
- Get Group Access Requests
-
- Invite User To Group (Requires Moderator Status)
-
- Remove User From Group (Requires Moderator Status)
-
- Approve User Request To Join Group (Requires Moderator Status)
VKUsers Resource
This Resource allows you to work with users and their data
How to use:
Initialize New VKUsers object:
Now you can call methods, e.g.
There are 6 API Methods presented in this Resource:
-
- Returns detailed information on users
-
- Returns a list of users matching the search criteria
-
- Returns information whether a user installed the application
-
- Returns a list of IDs of users and communities followed by the user
-
- Returns a list of IDs of followers of the user in question, sorted by date added, most recent first
-
- Get Nearby Users Based On Current Latitude and Longitude
All versions of vk-api with dependencies
ext-pdo Version *
ext-curl Version *