Skip to content

Instantly share code, notes, and snippets.

View PatrickHallek's full-sized avatar

Patrick Hallek PatrickHallek

View GitHub Profile

API Design Guideline

Introduction

The PayPal platform is a collection of reusable services that encapsulate well-defined business capabilities. Developers are encouraged to access these capabilities through Application Programming Interfaces (APIs) that enable consistent design patterns and principles. This facilitates a great developer experience and the ability to quickly compose complex business processes by combining multiple, complementary capabilities as building blocks.

PayPal APIs follow the [RESTful][0] architectural style as much as possible. To support our objectives, we have developed a set of rules, standards, and conventions that apply to the design of RESTful APIs. These have been used to help design and maintain hundreds of APIs and have evolved over several years to meet the needs of a wide variety of use cases.

We are sharing these guidelines to help propagate good API design practices in general. We have pulled extensively from the broader community and believe that it is important t

#define inputPin 5 // PIR Sensor
#define outputPin 4 // Relay
#define switchPin 2 // Switch button state
int val = 0;
bool motionState = false;
int timeBuffer = 6; // in seconds
int measurementInterval = 100; // in milliseconds
int i = 0;
int switchState = 0;
{"schemaVersion":1,"label":"Coverage","message":"100%","color":"green"}
import serial
import time
import datetime
import json
import redis
r = redis.Redis(host='localhost', port=6379, db=0)
DWM = serial.Serial(port="/dev/ttyACM0", baudrate=115200)
print("Connected to " + DWM.name)
DWM.write("\r\r".encode())