Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
b54ab342
Commit
b54ab342
authored
Apr 15, 2014
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with not fetching google contacts after recent Google changes
parent
a48a52ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
client.py
blink/google/gdata/contacts/client.py
+4
-6
service.py
blink/google/gdata/contacts/service.py
+4
-6
No files found.
blink/google/gdata/contacts/client.py
View file @
b54ab342
...
@@ -35,8 +35,7 @@ class ContactsClient(gdata_client.GDClient):
...
@@ -35,8 +35,7 @@ class ContactsClient(gdata_client.GDClient):
contact_list
=
"default"
contact_list
=
"default"
auth_scopes
=
gdata_gauth
.
AUTH_SCOPES
[
'cp'
]
auth_scopes
=
gdata_gauth
.
AUTH_SCOPES
[
'cp'
]
def
get_feed_uri
(
self
,
kind
=
'contacts'
,
contact_list
=
None
,
projection
=
'full'
,
def
get_feed_uri
(
self
,
kind
=
'contacts'
,
contact_list
=
None
,
projection
=
'full'
,
scheme
=
"https"
):
scheme
=
"http"
):
"""Builds a feed URI.
"""Builds a feed URI.
Args:
Args:
...
@@ -451,8 +450,7 @@ class ContactsQuery(gdata_client.Query):
...
@@ -451,8 +450,7 @@ class ContactsQuery(gdata_client.Query):
class
ProfilesQuery
(
gdata_client
.
Query
):
class
ProfilesQuery
(
gdata_client
.
Query
):
def
__init__
(
self
,
feed
=
None
):
def
__init__
(
self
,
feed
=
None
):
self
.
feed
=
feed
or
'http://www.google.com/m8/feeds/profiles/default/full'
self
.
feed
=
feed
or
'https://www.google.com/m8/feeds/profiles/default/full'
def
_CleanUri
(
self
,
uri
):
def
_CleanUri
(
self
,
uri
):
"""Sanitizes a feed URI.
"""Sanitizes a feed URI.
...
@@ -461,10 +459,10 @@ class ProfilesQuery(gdata_client.Query):
...
@@ -461,10 +459,10 @@ class ProfilesQuery(gdata_client.Query):
uri: The URI to sanitize, can be relative or absolute.
uri: The URI to sanitize, can be relative or absolute.
Returns:
Returns:
The given URI without its http://server prefix, if any.
The given URI without its http
s
://server prefix, if any.
Keeps the leading slash of the URI.
Keeps the leading slash of the URI.
"""
"""
url_prefix
=
'http://
%
s'
%
self
.
server
url_prefix
=
'http
s
://
%
s'
%
self
.
server
if
uri
.
startswith
(
url_prefix
):
if
uri
.
startswith
(
url_prefix
):
uri
=
uri
[
len
(
url_prefix
):]
uri
=
uri
[
len
(
url_prefix
):]
return
uri
return
uri
blink/google/gdata/contacts/service.py
View file @
b54ab342
...
@@ -29,10 +29,8 @@ from blink.google import gdata
...
@@ -29,10 +29,8 @@ from blink.google import gdata
from
blink.google.gdata
import
service
as
gdata_service
from
blink.google.gdata
import
service
as
gdata_service
DEFAULT_BATCH_URL
=
(
'http://www.google.com/m8/feeds/contacts/default/full'
DEFAULT_BATCH_URL
=
'https://www.google.com/m8/feeds/contacts/default/full/batch'
'/batch'
)
DEFAULT_PROFILES_BATCH_URL
=
'https://www.google.com/m8/feeds/profiles/default/full/batch'
DEFAULT_PROFILES_BATCH_URL
=
(
'http://www.google.com'
'/m8/feeds/profiles/default/full/batch'
)
GDATA_VER_HEADER
=
'GData-Version'
GDATA_VER_HEADER
=
'GData-Version'
...
@@ -375,10 +373,10 @@ class ContactsService(gdata_service.GDataService):
...
@@ -375,10 +373,10 @@ class ContactsService(gdata_service.GDataService):
uri: The URI to sanitize, can be relative or absolute.
uri: The URI to sanitize, can be relative or absolute.
Returns:
Returns:
The given URI without its http://server prefix, if any.
The given URI without its http
s
://server prefix, if any.
Keeps the leading slash of the URI.
Keeps the leading slash of the URI.
"""
"""
url_prefix
=
'http://
%
s'
%
self
.
server
url_prefix
=
'http
s
://
%
s'
%
self
.
server
if
uri
.
startswith
(
url_prefix
):
if
uri
.
startswith
(
url_prefix
):
uri
=
uri
[
len
(
url_prefix
):]
uri
=
uri
[
len
(
url_prefix
):]
return
uri
return
uri
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment