Skip to content

mellaught/Vk-Parser-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Vk Parser Service.

Description.

UNDER CONSTRUCTION.

List of endpoints.

1. POST /getProfiles

TORUN.

  • go get github.com/mrKitikat/Vk-Parser-Service.

  • cd $GOPATH/src/github.com/mrkitikat/vk-parser-service/src

  • dep ensure.

  • go run main.go

Config file.

Config in config.json.

{
	"name": "Vk Parser Service",
	"vk": {
		"url": "https://api.vk.com/method/",
		"version": "",
		"token": ""
	},
	"server": {
		"host": "",
		"port": ""
	}
}

Default:

  • vk.version --- Version of vk api. Type: String. Default: "5.103".
  • vk.token --- Your private api token. Type: String.
  • server.host --- Host of Vk Parser Service. Type: String. Default: "localhost".
  • server.port --- Port of Vk Parser Service. Type String. Default: "8080".

1. POST /getProfiles

Description.

UNDER CONSTRUCTION.

Request.

  • "Content-Type", "application/json"

  • POST http://service.host:service.port/getProfiles

Body:

{
	"id": string // User id
	"intersect_number": int //current minimum number(N) of occurrences, N > 1
	"sex": int // 1 - woman, 2 - man
	"Message": bool // can write private message
}

Responce .

1. StatusCode = 200:

Body:

{
	"text": "",
	"responce": 
}

Cases.

    • "text": "The list is empty". Means that intersection is empty with current params from request.
    • "responce": ""
    • "text": "We found N people". Means that intersection is not empty and contains N people with current params from request.
    • "responce": [id_1, id_2, ..., id_N]. Contains people's id from intersection. Type []int64.

Examples.

Returned group members with ids: [1, 2, 4, 6, 1, 3, 1, 2, 3].

  • IF intersect_number = 2 in request ---> intersection is [1, 2, 3].
  • ELSE IF intersect_number = 3 in request ---> intersection is [1].
  • ELSE IF intersect_number = 4 in request ---> intersection is [ ].

Other parameters from the request impose additional constraints.

TODO

  • Parsing members.
  • Intersection groups.
  • Tests for intersection methods.
  • Parse posts.
  • Tests for posts methods.
  • Parse comments.
  • Tests for comments methods.
  • Parse what user likes.
  • Tests for like methods.

About

Parsing group members, posts, likes, comments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages