Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zoholib
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
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gems
zoholib
Commits
808a3bbc
Commit
808a3bbc
authored
Nov 11, 2020
by
Oleksandr
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix options
parent
980cbbad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
authorization_request.rb
lib/zoholib/authorization_request.rb
+3
-1
grant_request.rb
lib/zoholib/grant_request.rb
+3
-2
refresh_request.rb
lib/zoholib/refresh_request.rb
+1
-0
zoho_basic_client.rb
lib/zoholib/zoho_basic_client.rb
+1
-0
No files found.
lib/zoholib/authorization_request.rb
View file @
808a3bbc
...
...
@@ -17,14 +17,16 @@ module Wedoops
}
def
initialize
(
options
=
{})
@options
=
Hash
.
new
# environment specific settings
if
options
.
has_key?
(
:environment
)
&&
options
[
:environment
]
==
"sandbox"
self
.
class
.
base_uri
"https://sandbox.zohoapis.com/oauth/v2/"
options
.
delete
(
:environment
)
@options
[
:environment
]
=
"sandbox"
end
#build_url(options)
@logger
=
::
Logger
.
new
(
STDOUT
)
@options
=
Hash
.
new
options
.
merge!
({
response_type:
'code'
,
access_type:
'offline'
,
redirect_uri:
'http://localhost:8000/auth/callback'
})
@grant_token
=
options
[
:grant_token
]
#@options.merge!(grant_token: options[:grant_token] )
...
...
lib/zoholib/grant_request.rb
View file @
808a3bbc
...
...
@@ -8,7 +8,8 @@ module Wedoops
def
initialize
(
options
=
{})
# environment specific settings
if
options
.
has_key?
(
:environment
)
&&
options
[
:environment
]
==
"sandbox"
self
.
class
.
base_url
"https://sandbox.zohoapis.com/oauth/v2/"
self
.
class
.
base_uri
"https://sandbox.zohoapis.com/oauth/v2/"
options
.
delete
(
:environment
)
end
@logger
=
::
Logger
.
new
(
STDOUT
)
...
...
lib/zoholib/refresh_request.rb
View file @
808a3bbc
...
...
@@ -16,6 +16,7 @@ module Wedoops
# environment specific settings
if
options
.
has_key?
(
:environment
)
&&
options
[
:environment
]
==
"sandbox"
self
.
class
.
base_uri
"https://sandbox.zohoapis.com/oauth/v2/"
options
.
delete
(
:environment
)
end
options
.
merge!
(
grant_type:
"refresh_token"
)
...
...
lib/zoholib/zoho_basic_client.rb
View file @
808a3bbc
...
...
@@ -26,6 +26,7 @@ module Wedoops
@token
=
nil
@token_payload
=
nil
@token_expires
=
DateTime
.
now
@logger
.
debug
(
"init client:
#{
@options
}
"
)
end
def
login?
...
...
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