<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| import requests | |
| from booking_generator import GenerateBooking | |
| def _url(path): | |
| return 'https://reqres.in/api' + path | |
| def get_bookings(firstname="", lastname="", checkin="", checkout=""): | |
| payload = {} | |
| if firstname: | |
| payload['firstname'] = firstname |
| import json | |
| def json_file_filter_list(term, column, file) : | |
| with open(file) as json_file: | |
| data = json.load(json_file) | |
| result = [] | |
| for p in data: | |
| if term.lower() in p[column].lower() : | |
| result.append(p) |
| from flask import Flask | |
| app = Flask(__name__) | |
| @app.route("/sms") | |
| def hello(): | |
| return "Hello World!" | |
| if __name__ == "__main__": | |
| app.run(debug=True) |
| from twilio.rest import Client | |
| def send_sms_twilio(to, body) : | |
| account_sid = 'XXXXX' | |
| auth_token = 'XXXXX' | |
| client = Client(account_sid, auth_token) | |
| message = client.messages.create(from_='+18135484868', to=to, body=body) |
| package app; | |
| import java.io.BufferedReader; | |
| import java.io.DataInputStream; | |
| import java.io.DataOutputStream; | |
| import java.io.EOFException; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.net.Socket; |
| class Stars { | |
| public static void main(String args[]) { | |
| int p = 20, diff = 2; | |
| for (int i = p, d = -diff; i <= p; i += d) { | |
| while ((i == 0 && d != diff) || i == 1 && d != diff)d = diff; |
| bool validateEmail(String value) { | |
| Pattern pattern = | |
| r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; | |
| RegExp regex = new RegExp(pattern); | |
| return (!regex.hasMatch(value)) ? false : true; | |
| } | |
| void main() { | |
| print(validateEmail("[email protected]")); | |
| } |
| import { Injectable } from '@angular/core'; | |
| import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from 'angularfire2/firestore'; | |
| import { Observable } from 'rxjs/Observable'; | |
| import { Item } from '../models/Item'; | |
| @Injectable() | |
| export class ItemService { | |
| itemsCollection: AngularFirestoreCollection<Item>; | |
| items: Observable<Item[]>; |