Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-07-07 17:15:37 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
af569cd2e0bcc0bafb14c3c5b1683ec9554afcb4
af569cd2
1 parent
6dfd7358
add getCosmoteUserAsync request
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.h
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
af569cd
...
...
@@ -86,6 +86,7 @@
-
(
void
)
getPacingDetailsAsync
:(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
cosmoteSharingAsync
:(
NSString
*
)
sharingId
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
cosmoteRetrieveSharingAsync
:(
NSString
*
)
sharingId
:
(
NSNumber
*
)
accept
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
getCosmoteUserAsync
:(
NSString
*
)
guid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
@end
#endif
/* MyApi_h */
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
af569cd
...
...
@@ -1418,4 +1418,17 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
}];
}
-
(
void
)
getCosmoteUserAsync
:
(
NSString
*
)
guid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
{
[[
Warply
sharedService
]
getCosmoteUserWithSuccessBlock
:
guid
:
^
(
NSDictionary
*
response
)
{
if
(
success
)
{
success
(
response
);
}
}
failureBlock
:^
(
NSError
*
error
)
{
if
(
failure
)
{
failure
(
error
);
}
}];
}
@end
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.h
View file @
af569cd
...
...
@@ -352,6 +352,8 @@ WL_VERSION_INTERFACE()
-
(
void
)
verifyTicketWithSuccessBlock
:(
NSString
*
)
guid
:
(
NSString
*
)
ticket
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
getCosmoteUserWithSuccessBlock
:(
NSString
*
)
guid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
addAddressWithSuccessBlock
:(
NSString
*
)
friendlyName
:
(
NSString
*
)
addressName
:
(
NSString
*
)
addressNumber
:
(
NSString
*
)
postalCode
:
(
NSNumber
*
)
floorNumber
:
(
NSString
*
)
doorbel
:
(
NSString
*
)
region
:
(
NSString
*
)
latitude
:
(
NSString
*
)
longitude
:
(
NSString
*
)
notes
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
getAddressWithSuccessBlock
:(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
af569cd
This diff is collapsed. Click to expand it.
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
af569cd
...
...
@@ -2819,4 +2819,41 @@ public class swiftApi {
}
}
public
func
getCosmoteUserAsync
(
guid
:
String
,
_
getCosmoteUserCallback
:
@escaping
(
_
responseData
:
GenericResponseModel
?)
->
Void
)
->
Void
{
let
instanceOfMyApi
=
MyApi
()
instanceOfMyApi
.
getCosmoteUserAsync
(
guid
,
requestCallback
,
failureBlock
:
requestFailureCallback
)
func
requestCallback
(
_
responseData
:
[
AnyHashable
:
Any
]?)
->
Void
{
if
let
responseDataDictionary
=
responseData
as?
[
String
:
AnyObject
]
{
if
(
responseDataDictionary
[
"status"
]
as?
Int
==
1
)
{
if
let
responseDataDictionary
=
responseData
as?
[
String
:
Any
]
{
let
tempResponse
=
GenericResponseModel
(
dictionary
:
responseDataDictionary
)
getCosmoteUserCallback
(
tempResponse
);
}
else
{
getCosmoteUserCallback
(
nil
)
}
}
else
{
getCosmoteUserCallback
(
nil
)
}
}
else
{
getCosmoteUserCallback
(
nil
)
}
}
func
requestFailureCallback
(
_
error
:
Error
?)
->
Void
{
print
(
"getCosmoteUser error: "
)
print
(
error
)
print
(
"===================="
)
getCosmoteUserCallback
(
nil
)
}
}
}
...
...
Please
register
or
login
to post a comment