This file contains 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
""" | |
This is a simple async Intercom client that uses their rest api to list, search, create and delete contacts. | |
""" | |
import httpx | |
class Client: | |
def __init__(self, access_token): | |
self.headers = { | |
"Authorization": f"Bearer {access_token}", |
This file contains 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
var attr = DS.attr, | |
hasMany = DS.hasMany, | |
belongsTo = DS.belongsTo, | |
Model = DS.Model; | |
App.Address = Model.extend({ | |
street: attr('string'), | |
streetNumber: attr('string'), | |
detail: attr('string'), | |
}); |
This file contains 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
var forEach = Ember.EnumerableUtils.forEach; | |
var get = Ember.get; | |
function setKey(record, type) { | |
record.id = Ember.generateGuid(null, type); | |
record.autoGenerated = true; | |
} | |
// chooses a relationship kind to branch which function is used to update payload | |
// does not change payload if attr is not embedded |