-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKG-INFO
112 lines (81 loc) · 4.82 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Metadata-Version: 1.0
Name: python-linkedin
Version: 1.6.4
Summary: Python Interface for the LinkedIn API
Home-page: http://code.google.com/p/python-linkedin/
Author: Ozgur Vatansever
Author-email: [email protected]
License: The MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Description: README for Python Implementation of LinkedIn API
LinkedIn API for Python
=======================
This package provides a pure python interface for the LinkedIn Connection and Profile APIs.
Author: `Ozgur Vatansever <[email protected]>`
LinkedIn (http://developer.linkedin.com) provides a service that let people bring their LinkedIn profiles
and networks with them to your site or application via their OAuth based API. This library provides a simple
architecture over a complicated LinkedIn OAuth based API to make it for python programmers easy to use.
INSTALLATION
============
You have 2 options:
1) Getting the code from repository:
- svn co http...
2) Getting the code from Google Code website of python-linkedin
- wget bla bla..
Enter the directory you've just downloaded, and execute the following command on shell to install the package:
- sudo python setup.py install
BASIC USAGE
===========
In order to use it you have an 'application key' and 'application secret'.
For debugging I am providing you those. You can use the following as api key and secret:
KEY = wFNJekVpDCJtRPFX812pQsJee-gt0zO4X5XmG6wcfSOSlLocxodAXNMbl0_hw3Vl
SECRET = daJDa6_8UcnGMw1yuq9TjoO_PMKukXMo8vEMo7Qv5J-G3SPgrAV0FqFCd0TNjQyG
You can use "http://localhost" as the return url. Return URL is a url where LinkedIn redirects the user after he/she grants access to
your application.
"""
from linkedin import linkedin
RETURN_URL = "http://localhost"
api = linkedin.LinkedIn(KEY, SECRET, RETURN_URL)
result = api.requestToken() # result can be True or False
# if True, you can open your browser and copy the authorization url of LinkedIn.
api.getAuthorizeURL() # open this url on your browser
# When you grants access to the application, you will be redirected to the return url with the following query strings appended to your RETURN_URL:
http://localhost/?oauth_token=0b27806e-feec-41d4-aac5-619ba43770f1&oauth_verifier=04874
auth_verifier = 04874
# After you get the verifier, you call the accessToken() method to get the access token.
result = api.accessToken("04874") # result can be True or False
# if True, now you can fetch the methods that LinkedIn provides.
# To fetch your profile, simply call GetProfile method.
profile = api.GetProfile()
profile.id # is your id (may be null)
# if you know your public url, call the method above with your public url for more information
profile = api.GetProfile(member_id = None, url = "http://www.linkedin.com/in/ozgurv")
profile.id # is your id
profile.first_name
profile.last_name
profile.picture_url
...
...
# To fetch your connections, simply call
connections = api.GetConnections() # connections is a list of profiles
LICENSE
=======
This package is licensed under the GNU General Public License V2.
To see the license, visit the following link:
- http://www.gnu.org/licenses/gpl-2.0.txt
Platform: linux