This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Method just for getting keyboard height | |
@objc func keyboardWillShow(_ notification: Notification) { | |
if let keyboardFrame: NSValue = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue { | |
let keyboardRectangle = keyboardFrame.cgRectValue | |
keyboardHeight = keyboardRectangle.height | |
} | |
} | |
func checkIfKeyboardIsOverTextField(keyboardHeight: CGFloat) { | |
for field in textfieldCollection { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Data coming from API when selecting | |
{ | |
data = { | |
food = ( | |
); | |
logo = ""; | |
picture = ""; | |
}; | |
msg = "Venue detail"; | |
status = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs to return venue objects | |
{ | |
"place_id": "1", | |
"name": "Elitch Garden", | |
"picture": "http://api.lineopener.com/uploads/elitches_3.jpg", | |
"status": "1", | |
"created": "2017-12-18 00:00:00", | |
"venue_count": 2 | |
}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"venue_id": "3", | |
"place_id": "5", | |
"name": "McCrady's", | |
"cuisine_filter": {"Indian", "Breakfast", "American", "Burger"} <-- or whatever | |
"address": "Per Se, New York City", | |
"phone_number": "7854732545", | |
"description": "Test Data To add data", | |
"picture": "http://api.lineopener.com/uploads/street-view.jpg", | |
"logo": "http://api.lineopener.com/uploads/street-view.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 1, | |
"msg": "Venue detail", | |
"statuscode": 201, | |
"data": { | |
"venue_id": "1", | |
"place_id": "1", | |
"name": "Test Venue", | |
"address": "Its A test Address", | |
"phone_number": "123456123456", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 1, | |
"msg": "Category List", | |
"statuscode": 201, | |
"data": [ | |
{ | |
"category_id": "1", | |
"name": "burgers", | |
"venue_id": "1", | |
"picture": "http://api.lineopener.com/uploads/burguer.png", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 1, | |
"msg": "Food style List", | |
"statuscode": 201, | |
"data": { | |
"patty": [ | |
{ | |
"food_style_id": "1", | |
"food_id": "1", | |
"style_name": "patty", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NSHTTPURLResponse: 0x604000226700> { URL: http://api.lineopener.com/index.php/api/login } { Status Code: 200, Headers { | |
"Cache-Control" = ( | |
"no-store, no-cache, must-revalidate, post-check=0, pre-check=0" | |
); | |
Connection = ( | |
"Keep-Alive" | |
); | |
"Content-Type" = ( | |
"application/json" | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//modified curl method - Success | |
curl -d "[email protected]&password=test123" -X POST http://api.lineopener.com/index.php/api/login | |
{"status":1,"msg":"Login successfully","statuscode":201,"data":{"user_id":"2","email":"[email protected]","phone_number":"","password":"cc03e747a6afbbcbf8be7668acfebee5","fb_id":"","password_reset_code":"","status":"1","created":"2017-10-26 14:17:29","updated":"2017-10-26 14:17:29"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//tried as single line (failed) | |
curl --request POST --url http://api.lineopener.com/index.php/api/login --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' --form [email protected] --form password=test123 | |
{"status":0,"msg":"Please enter email","statuscode":403} |