Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
captainwong
douban-api-proxy
Commits
6becca17
Commit
6becca17
authored
Feb 26, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'fix/fix_time' into Develop
parents
7d795771
cba3e62e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
kobo.py
cps/kobo.py
+4
-2
No files found.
cps/kobo.py
View file @
6becca17
...
@@ -21,6 +21,7 @@ import sys
...
@@ -21,6 +21,7 @@ import sys
import
base64
import
base64
import
os
import
os
import
uuid
import
uuid
from
datetime
import
datetime
from
time
import
gmtime
,
strftime
from
time
import
gmtime
,
strftime
try
:
try
:
from
urllib
import
unquote
from
urllib
import
unquote
...
@@ -234,14 +235,14 @@ def create_book_entitlement(book):
...
@@ -234,14 +235,14 @@ def create_book_entitlement(book):
return
{
return
{
"Accessibility"
:
"Full"
,
"Accessibility"
:
"Full"
,
"ActivePeriod"
:
{
"From"
:
current_time
(),},
"ActivePeriod"
:
{
"From"
:
current_time
(),},
"Created"
:
book
.
timestamp
,
"Created"
:
book
.
timestamp
.
strftime
(
"
%
Y-
%
m-
%
dT
%
H:
%
M:
%
SZ"
)
,
"CrossRevisionId"
:
book_uuid
,
"CrossRevisionId"
:
book_uuid
,
"Id"
:
book_uuid
,
"Id"
:
book_uuid
,
"IsHiddenFromArchive"
:
False
,
"IsHiddenFromArchive"
:
False
,
"IsLocked"
:
False
,
"IsLocked"
:
False
,
# Setting this to true removes from the device.
# Setting this to true removes from the device.
"IsRemoved"
:
False
,
"IsRemoved"
:
False
,
"LastModified"
:
book
.
last_modified
,
"LastModified"
:
book
.
last_modified
.
strftime
(
"
%
Y-
%
m-
%
dT
%
H:
%
M:
%
SZ"
)
,
"OriginCategory"
:
"Imported"
,
"OriginCategory"
:
"Imported"
,
"RevisionId"
:
book_uuid
,
"RevisionId"
:
book_uuid
,
"Status"
:
"Active"
,
"Status"
:
"Active"
,
...
@@ -397,6 +398,7 @@ def HandleUserRequest(dummy=None):
...
@@ -397,6 +398,7 @@ def HandleUserRequest(dummy=None):
@
kobo
.
route
(
"/v1/products/<dummy>/reviews"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products/<dummy>/reviews"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products/books/<dummy>"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products/books/<dummy>"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products/dailydeal"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products/dailydeal"
,
methods
=
[
"GET"
,
"POST"
])
@
kobo
.
route
(
"/v1/products"
,
methods
=
[
"GET"
,
"POST"
])
def
HandleProductsRequest
(
dummy
=
None
):
def
HandleProductsRequest
(
dummy
=
None
):
log
.
debug
(
"Unimplemented Products Request received:
%
s"
,
request
.
base_url
)
log
.
debug
(
"Unimplemented Products Request received:
%
s"
,
request
.
base_url
)
return
redirect_or_proxy_request
()
return
redirect_or_proxy_request
()
...
...
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