Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rails_dingtalk
Project
Overview
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
other
rails_dingtalk
Commits
70be1a94
Commit
70be1a94
authored
Sep 05, 2021
by
mingyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base host
parent
b5292d9e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
base.rb
app/apis/dingtalk/api/base.rb
+7
-3
new.rb
app/apis/dingtalk/api/new.rb
+4
-0
No files found.
app/apis/dingtalk/api/base.rb
View file @
70be1a94
...
...
@@ -16,19 +16,23 @@ module Dingtalk::Api
get
'get_jsapi_ticket'
,
base:
BASE
end
def
get
(
path
,
params:
{},
headers:
{},
base:
nil
,
as:
nil
)
def
base_host
BASE
end
def
get
(
path
,
params:
{},
headers:
{},
base:
base_host
,
as:
nil
)
with_access_token
(
params
)
do
|
with_token_params
|
@client
.
get
path
,
headers:
headers
,
params:
with_token_params
,
base:
base
,
as:
as
end
end
def
post
(
path
,
params:
{},
headers:
{},
base:
nil
,
**
payload
)
def
post
(
path
,
params:
{},
headers:
{},
base:
base_host
,
**
payload
)
with_access_token
(
params
)
do
|
with_token_params
|
@client
.
post
path
,
payload
.
to_json
,
headers:
headers
,
params:
with_token_params
,
base:
base
end
end
def
post_file
(
path
,
file
,
params:
{},
headers:
{},
base:
nil
)
def
post_file
(
path
,
file
,
params:
{},
headers:
{},
base:
base_host
)
with_access_token
(
params
)
do
|
with_token_params
|
@client
.
post_file
path
,
file
,
headers:
headers
,
params:
with_token_params
,
base:
base
end
...
...
app/apis/dingtalk/api/new.rb
View file @
70be1a94
...
...
@@ -15,5 +15,9 @@ module Dingtalk::Api
}
end
def
base_host
BASE
end
end
end
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