Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
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
qorri_di
medapp_eksad
Commits
04723573
Commit
04723573
authored
Sep 21, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
56fc8238
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
164 additions
and
13 deletions
+164
-13
sosmed_api.dart
lib/api/sosmed_api.dart
+55
-0
admin_sosmed.dart
lib/dashboard/admin/admin_sosmed.dart
+109
-13
No files found.
lib/api/sosmed_api.dart
0 → 100644
View file @
04723573
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
var
cmd
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/cmd'
;
var
qry
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/qry'
;
Future
<
bool
>
createSosmed
(
wa
,
ln
,
tw
,
ig
,
yt
)
async
{
final
response
=
await
http
.
post
(
Uri
.
parse
(
'
$cmd
/settingsosmed/saveSettingSosmed'
),
body:
jsonEncode
(
{
"whatsapp"
:
wa
,
"linkedin"
:
ln
,
"twitter"
:
tw
,
"instagram"
:
ig
,
"youtube"
:
yt
}),
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
});
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
}
Future
<
bool
>
updateSosmed
(
wa
,
ln
,
tw
,
ig
,
yt
)
async
{
final
response
=
await
http
.
put
(
Uri
.
parse
(
'
$cmd
/settingsosmed/updateSettingSosmed'
),
body:
jsonEncode
({
'whatsapp'
:
wa
,
'linkedin'
:
ln
,
'twitter'
:
tw
,
'instagram'
:
ig
,
'youtube'
:
yt
}),
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
});
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
}
Future
<
List
<
dynamic
>>
getSosmedDesc
()
async
{
var
response
=
await
http
.
get
(
Uri
.
parse
(
'
$qry
/settingsosmed/getSettingSosmedById'
));
// Uri.parse('$qry/settingsosmed/getSettingSosmedByIdDesc'));
return
jsonDecode
(
response
.
body
)[
'data'
];
}
\ No newline at end of file
lib/dashboard/admin/admin_sosmed.dart
View file @
04723573
This diff is collapsed.
Click to expand it.
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