Skip to content

Instantly share code, notes, and snippets.

View fernandomitre7's full-sized avatar

Fernando Mitre fernandomitre7

View GitHub Profile
var test = (function ($, document) {
function doSomethingMethod () {
console.log(‘do something!’);
}
return {
doSomething: doSomethingMethod
};
})(window.jQuery, window.document);
{
"caller_ids": [
{
"active": false, //Value that indicates if the caller id is active, if it is active we can use it (I don't think we use this value)
"id": "a035000000SstJ7AAJ",
"name": "MX Mobile",
"number": "5218117997371", //duplicated values
"phone": "5218117997371",
"selected": false //Value that indicates if this caller id is selected to be used. Only 1 can be selected at a time
}
{
"category": "recordings",
"description": "Recordings",
"account_sid": "AC1001e3115d52a64e3b4c9ecd3d4d2ad3",
"start_date": "2016-07-14",
"end_date": "2016-08-10",
"count": "30",
"count_unit": "recordings",
"usage": "31",
"usage_unit": "recorded-minutes",
public static List<Map<String, String>> search(string keySearch, Map<String, List<String>> objects) {
String searchQuery = 'FIND \'*' + String.escapeSingleQuotes(keySearch) + '*\' IN ALL FIELDS RETURNING ';
List<List<SObject>> searchList;
Integer i = 0, j = 0;
String currentObject;
//Creating the dynamic query
for (String key : objects.keySet()) {
i++;
j = 0;
/**
* Este metodo es el que genera la firma
* url es el url que estamos llamando String url = containerReqCtxt.getUriInfo().getAbsolutePath().toString();
* params es el mapa con los query params y body params (ver metodo extractInputParams)
* authkey es la llave secreta
*/
public static String generateSignature(String url,
Map<String, Object> params, String authKey)
throws NoSuchAlgorithmException, InvalidKeyException,
IllegalStateException, UnsupportedEncodingException {
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": [
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
{
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"sections" : [
{
@fernandomitre7
fernandomitre7 / Word_Document_Transform_List.json
Last active March 4, 2016 16:02
New complex merge, schema structure example.
{
"sections": [
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},