Skip to content

Instantly share code, notes, and snippets.

View michaeldmueller's full-sized avatar

Michael Mueller michaeldmueller

  • Chicago, IL
View GitHub Profile
{
"type": "state",
"name": "New York"
},
{
"type": "region",
"name": "Long Island"
},
{
"type": "county",
@michaeldmueller
michaeldmueller / terms_of_use.md
Last active April 21, 2021 14:57
QuitThat! Terms of Use

Privacy Policy

Please review our Privacy Policy. By using this application, you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use.

User Representation

By using this application, you represent that

  1. you have the legal capacity and you agree to comply with these Terms of Use
  2. you will not use this application for any illegal or unauthorized purpose
  3. your use of this application will not violate any applicable laws

Payment

@michaeldmueller
michaeldmueller / privacy_policy.md
Last active April 20, 2021 00:45
QuitThat! Privacy Policy

How We Store Your Data

QuitThat operates in two modes: local and cloud-based. While in local mode, all of your data is stored exclusively on your device and will never leave. If you create an account, QuitThat will switch into cloud-based mode. In cloud-based mode, all of your data is backed up by our encrypted servers to prevent you from losing it and to offer unique features, such as group quits.

What Data Our App Collects

QuitThat only collects the data that you provided. This includes:

  • First and last name
  • Email address
  • Address (if provided)
  • Your saved habits
@michaeldmueller
michaeldmueller / response_objects.md
Last active October 14, 2020 20:10
Response Objects

/auth

struct AuthResponse: Decodable {
    var data: UserDataResponse
    
    struct UserDataResponse: Decodable {
        var id: Int
        var email: String
        var apiToken: String
        var customer: CustomerResponse

getReferralData

/referral

Expected return

{
  "referrals_converted": 3,
  "credit_earned": 30.00,
 "current_account_credit": 50.00,

Endpoints

getRestaurants()

/restaurants Used for getting an array of all restaurants, organized by category.

Returns

{
  [

Order (/orders)

[
  {
    "id": "110668"
    "displayName": "Michael Mueller",
    "isActive": true
  },
  {
 "id": "104749"

Login Calls

Data Models

User Data

Contains basic user information, such as name and contact information. Could contain address information, or this could be obtained in separate call when editing. Advantage to immediately returning UserData is that if location services aren't enabled, we could localize their nearby restaurants based on shipping address.

UserData {
  id: String                // Whatever it's currently stored as
 fullName: String