Download the PHP package andrey-helldar/vk without Composer
On this page you can find all versions of the php package andrey-helldar/vk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrey-helldar/vk
More information about andrey-helldar/vk
Files in andrey-helldar/vk
Package vk
Short Description Laravel package for VK API
License MIT
Homepage http://ai-rus.com
Informations about the package vk
VK API
Attention
Use a official sdk for VK API.
Menu
- Installation
- Update package
- Requests & responses
- Template
- Send request
- Get response
- Available methods
- Account
- Ads
- Apps
- Auth
- Board
- Database
- Docs
- Execute
- Fave
- Friends
- Gifts
- Groups
- Leads
- Likes
- Market
- Messages
- News feed
- Notes
- Notifications
- Pages
- Photos
- Places
- Polls
- Search
- Stats
- Status
- Storage
- Users
- Utils
- Video
- Wall
- Widgets
- Support
- Copyright and License
- Translation
Installation
To get the latest version of package for VK API, simply require the project using Composer:
Instead, you may of course manually update your require block and run composer update
if you so choose:
The version of this package is based on the VK API version and has the following appearance: x.y.z
, when:
x
- Major version of VK API.y
- Minor version of VK API.z
- Version of this package.
Once package is installed, you need to register the service provider. Open up config/app.php
and add the following to the providers
key, or if you're using Laravel 5.5+, this can be done via the automatic package discovery.
Helldar\Vk\VkServiceProvider::class,
Next, execute:
Add the following lines to .env
:
when:
VK_CLIENT_ID
- Application IDVK_CLIENT_SECRET
- Secure keyVK_SECRET_KEY
- Service token
See more at vk.com/dev
Alright! Use vk()
helper.
[ to menu ]
Update package
During development, we sometimes make changes to the structure of the database table, so after updating to a more recent version, run the command:
[ to menu ]
Requests & responses
ATTENTION!
For correct work this package user must be authorized on site.
[ to menu ]
Template
This package using Authorization Code Flow method to VK API (for server side of an application).
You can call the standard method for creating a button in a template:
or just use the route:
[ to menu ]
Send request
To send a request, use the following structure:
[ to menu ]
Get response
To test and receive a response from the API, use the get()
method:
[ to menu ]
Available methods
Account
banUser
(1) - Adds user to the banlist.changePassword
(1) - Changes a user password after access is successfully restored with the auth.restore method.getActiveOffers
(2) - Returns a list of active ads (offers) which executed by the user will bring him/her respective number of votes to his balance in the application.getAppPermissions
(2) - Gets settings of the user in this application.getBanned
(1) - Returns a user's blacklist.getCounters
(2) - Returns non-null values of user counters.getInfo
(1) - Returns current account info.getProfileInfo
(1) - Returns the current account info.getPushSettings
Access rights required: messages.lookupContacts
Access rights required: friends.registerDevice
Access rights required: messages.saveProfileInfo
(1) - Edits current profile info.setInfo
(1) - Allows to edit the current account info.setNameInMenu
(2) - Sets an application screen name (up to 17 characters), that is shown to the user in the left menu. This happens only in case the user added such application in the left menu from application page, from list of applications and settings.setOffline
(1) - Marks a current user as offline.setOnline
(1) - Marks the current user as online for 15 minutes.setPushSettings
Access rights required: messages.setSilenceMode
Access rights required: messages.unbanUser
(1) - Deletes user from the blacklist.unregisterDevice
Access rights required: messages.
See more at VK API: Account
[ to menu ]
Ads
API for VK advertising account is being beta tested. In case of any error or problem with API, please contact us at [email protected].
Before you can call API methods, authorize at server or client end. After it you can make any API requests using a standard interaction pattern.
Also, prior to start with Ads API, read limitations and recommendations.
Below there is a list of all methods for operations with the data of VK advertising accounts.
Access rights required: ads.
addOfficeUsers
(2) - Adds managers and/or supervisors to advertising account.checkLink
(2) - Allows to check the ad link.createAds
(2) - Creates ads. Please note! Maximum allowed number of ads created in one request is 5. Minimum size of ad audience is 50 people.createCampaigns
(2) - Creates advertising campaigns. Please note! Allowed number of campaigns created in one request is 50.createClients
(2) - Creates clients of an advertising agency. Available only for advertising agencies. Please note! Allowed number of clients created in one request is 50.createTargetGroup
(2) - Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).deleteAds
(2) - Archives ads.deleteCampaigns
(2) - Archives advertising campaigns.deleteClients
(2) - Archives clients of an advertising agency. Available only for advertising agencies.deleteTargetGroup
(2) - Deletes a retarget group.getAccounts
(2) - Returns a list of advertising accounts.getAds
(2) - Returns number of ads.getAdsLayout
(2) - Returns descriptions of ad layouts.getAdsTargeting
(2) - Returns ad targeting parameters.getBudget
(2) - Returns current budget of the advertising account.getCampaigns
(2) - Returns a list of campaigns in an advertising account.getCategories
(2) - Returns a list of possible ad categories.getClients
(2) - Returns a list of advertising agency's clients. Available only for advertising agencies.getDemographics
(2) - Returns demographics for ads or campaigns.getFloodStats
(2) - Returns information about current state of a counter — number of remaining runs of methods and time to the next counter nulling in seconds.getOfficeUsers
(2) - Returns a list of managers and supervisors of advertising account.getPostsReach
(2) - Returns a posts reach.getRejectionReason
(2) - Returns a reason of ad rejection for pre-moderation.getStatistics
(2) - Returns statistics of performance indicators for ads, campaigns, clients or the whole account.getSuggestions
(2) - Returns a set of auto-suggestions for various targeting parameters.getTargetGroups
(2) - Returns a list of target groups.getTargetingStats
(2) - Returns the size of targeting audience, and also recommended values for CPC and CPM.getUploadURL
(2) - Returns URL to upload an ad photo to.getVideoUploadURL
(2) - Returns URL to upload an ad video to.importTargetContacts
(2) - Imports a list of advertiser's contacts to count VK registered users against the target group. Please note! Maximum allowed number of contacts imported in one request is 1000.removeOfficeUsers
(2) - Removes managers and/or supervisors from advertising account.updateAds
(2) - Edits ads. Please note! Allowed number of ads edited in one request is 20. Minimum size of ad audience is 50 people.updateCampaigns
(2) - Edits advertising campaigns.updateClients
(2) - Edits clients of an advertising agency. Available only for advertising agencies. Please note! Maximum allowed number of clients edited in one request is 50.updateTargetGroup
(2) - Edits a retarget group.
See more at VK API: Ads
[ to menu ]
Apps
deleteAppRequests
(1) - Deletes all request notifications from the current app.get
(2) - Returns applications data.getCatalog
(2) - Returns a list of applications (apps) available to users in the App Catalog. You may call this method no more that 60 times in one minute from the same IP address or ID.getFriendsList
(1) - Creates friends list for requests and invites in current app.getLeaderboard
(2) - Returns players rating in the game.getScore
(2) - Returns user score in app.sendRequest
(1) - Sends a request to another user in an app that uses VK authorization.
See more at VK API: Apps
[ to menu ]
Auth
checkPhone
(3) - Checks a user's phone number for correctness.confirm
(3) - Completes a user's registration (begun with the auth.signup method) using an authorization code.restore
(2) - Allows to restore account access using a code received via SMS.signup
(3) - Registers a new user by phone number.
See more at VK API: Auth
[ to menu ]
Board
Access rights required: groups.
addTopic
(1) - Creates a new topic on a community's discussion board.closeTopic
(1) - Closes a topic on a community's discussion board so that comments cannot be posted.createComment
(1) - Adds a comment on a topic on a community's discussion board.deleteComment
(1) - Deletes a comment on a topic on a community's discussion board.deleteTopic
(1) - Deletes a topic from a community's discussion board.editComment
(1) - Edits a comment on a topic on a community's discussion board.editTopic
(1) - Edits the title of a topic on a community's discussion board.fixTopic
(1) - Pins a topic (fixes its place) to the top of a community's discussion board.getComments
(2) - Returns a list of comments on a topic on a community's discussion board.getTopics
(2) - Returns a list of topics on a community's discussion board.openTopic
(1) - Re-opens a previously closed topic on a community's discussion board.restoreComment
(1) - Restores a comment deleted from a topic on a community's discussion board.unfixTopic
(1) - Unpins a pinned topic from the top of a community's discussion board.
See more at VK API: Board
[ to menu ]
Database
These methods provide access to VK's database of educational institutions. Access to data is free and authorization is not required, but the number of requests from one IP address can be limited. If you need to execute many requests, we recommend that you call these methods from the client side using JSONP.
Access rights required: groups.
getChairs
(2) - Returns list of chairs on a specified faculty.getCities
(2) - Returns a list of cities.getCitiesById
(2) - Returns information about cities by their IDs.getCountries
(2) - Returns a list of countries.getCountriesById
(2) - Returns information about countries by their IDs.getFaculties
(2) - Returns a list of faculties (i.e., university departments).getRegions
(2) - Returns a list of regions.getSchoolClasses
(2) - Returns a list of school classes specified for the country.getSchools
(2) - Returns a list of schools.getStreetsById
(2) - Returns information about streets by their IDs.getUniversities
(2) - Returns a list of higher education institutions.
See more at VK API: Database
[ to menu ]
Docs
Access rights required: docs.
add
(2) - Copies a document to a user's or community's document list.delete
(2) - Deletes a user or community document.edit
(2) - Edits a document.get
(2) - Returns detailed information about user or community documents.getById
(2) - Returns information about documents by their IDs.getTypes
(2) - Returns documents types available for current user.getUploadServer
(2) - Returns the server address for document upload.getWallUploadServer
(4) - Returns the server address for document upload onto a user's or community's wall.save
(4) - Saves a document after uploading it to a server.search
(4) - Returns a list of documents matching the search criteria.
See more at VK API: Docs
[ to menu ]
Execute
execute
(3) - A universal method for calling a sequence of other methods while saving and filtering interim results.
See more at VK API: Execute
[ to menu ]
Friends
Access rights required: messages.
add
(1) - Approves or creates a friend request.addList
(1) - Creates a new friend list for the current user.areFriends
(2) - Checks the current user's friendship status with other specified users. Also returns information specifying whether there is an outgoing or incoming friend request (new follower).delete
(1) - Declines a friend request or deletes a user from the current user's friend list.deleteAllRequests
(1) - Marks all incoming friend requests as viewed.deleteList
(1) - Deletes a friend list of the current user.edit
(1) - Edits the friend lists of the selected user.editList
(1) - Edits a friend list of the current user.get
(2) - Returns a list of user IDs or detailed information about a user's friends.getAppUsers
(2) - Returns a list of IDs of the current user's friends who installed the application.getByPhones
(1) - Returns a list of the current user's friends whose phone numbers, validated or specified in a profile, are in a given list.getLists
(1) - Returns a list of the user's friend lists.getMutual
(2) - Returns a list of user IDs of the mutual friends of two users.getOnline
(2) - Returns a list of user IDs of a user's friends who are online.getRecent
(2) - Returns a list of user IDs of the current user's recently added friends.getRequests
(1) - Returns information about the current user's incoming and outgoing friend requests.getSuggestions
(1) - Returns a list of profiles of users whom the current user may know. For the method to return enough suggestions, method account.importContacts will be called first.search
(2) - Returns a list of friends matching the search criteria.
See more at VK API: Friends
[ to menu ]
Likes
Access rights required: wall.
add
(1) - Adds the specified object to the Likes list of the current user.delete
(1) - Deletes the specified object from the Likes list of the current user.getList
(2) - Returns a list of IDs of users who added the specified object to their Likes list.isLiked
(2) - Checks for the object in the Likes list of the specified user.
See more at VK API: Likes
[ to menu ]
Messages
Access rights required: messages.
send
- Sends a message.
See more at VK API: Messages
[ to menu ]
(1) This method can be called with a user token received in Standalone-app via Implicit Flow.
(2) This method can be called with a user token.
(3) This method can be called with a service token.
(4) This method can be called with a community token.
Copyright and License
Vk was written by Andrey Helldar for the Laravel Framework 5.4 or later, and is licensed under MIT License.
[ to menu ]
Translation
Translations of text and comment by Google Translate. Help with translation +1 in karma :)
Description of the VK API methods in the comments is taken from the VK API.
[ to menu ]
All versions of vk with dependencies
illuminate/http Version ^5.4
illuminate/bus Version ^5.4
illuminate/queue Version ^5.4
illuminate/database Version ^5.4
illuminate/console Version ^5.4
illuminate/support Version ^5.4
illuminate/routing Version ^5.4
illuminate/validation Version ^5.4
illuminate/view Version ^5.4
guzzlehttp/guzzle Version ^6.0
nesbot/carbon Version ^1.22