sb-github / extractor

2 stars 0 forks source link

Create API to request related skills and subskills #39

Open 4rtHurB opened 6 years ago

4rtHurB commented 6 years ago

Needed receive skills(OR only one skill) witch related with another skills(we send this skills) and their links or id links to vacancies. This needed for merging skills.

Graph relation for one skill

For example we want to receive all relation of skill "PHP" with skills "JS", "MySQL" by crawler which have id 5a609c5059c66de3dbcba0d9.

We turn to api the following way: (POST) .../extractor/graphskill?skill=PHP&crawler_id=5a609c5059c66de3dbcba0d9 with body {"skills": ["JS", "MySQL"]}

And receive the next response:

[
    {
        "skill": "PHP",
        "date": 1516373240,
        "connects": [
            {
                "subskill": "JS",
                "weight": 5,
                "links": [
                    "linkid1",
                    "linkid25",
                    "linkid7",
                    "linkid11",
                    "linkid7"
                ]
            },
            {
                "subskill": "MySQL",
                "weight": 1,
                "links": [
                    "linkid1"
                ]
            }
        ]
    }
]

Graph relation for all skills

Or enother example. We want to receive all relation of all skill which we will send to you by crawler which have id 5a609c5059c66de3dbcba0d9. We send you skills "PHP", "JS", "Java".

We turn to api the following way: (POST) .../extractor/graphskill?skill=ALL&crawler_id=5a609c5059c66de3dbcba0d9 with body {"skills": ["PHP", "JS", "Java"]}

And receive the next response:

[
    {
        "skill": "PHP",
        "date": 1516373240,
        "connects": [
            {
                "subskill": "JS",
                "weight": 5,
                "links": [
                    "linkid1",
                    "linkid25",
                    "linkid7",
                    "linkid11",
                    "linkid7"
                ]
            },
            {
                "subskill": "Java",
                "weight": 1,
                "links": [
                    "linkid1"
                ]
            }
        ]
    },
    {
        "skill": "JS",
        "date": 1516476908,
        "connects": [
            {
                "subskill": "PHP",
                "weight": 2,
                "links": [
                    "linkid1",
                    "linkid36"
                ]
            },
            {
                "subskill": "Java",
                "weight": 1,
                "links": [
                    "linkid23"
                ]
            }
        ]
    }
]
4rtHurB commented 6 years ago

When will the work on this task begin?