Skip to content

Instantly share code, notes, and snippets.

@purdrew
Created February 23, 2012 14:28
Show Gist options
  • Save purdrew/1893077 to your computer and use it in GitHub Desktop.
Save purdrew/1893077 to your computer and use it in GitHub Desktop.
Cordova proxy definitions. Used when implementation is defined in JS as opposed to native.
proxies: {
Contacts: {
actions: {
search: {
path: 'cordova/proxies/blackberry/contact_search'
},
save: {
path: 'cordova/proxies/blackberry/contact_save'
}
}
},
DirectoryEntry: {
path: 'cordova/proxies/blackberry/DirectoryEntry'
}
}
@pmuellr
Copy link

pmuellr commented Feb 23, 2012

I'm not sure what the 'path' points to, but would prefer to see less object-y configs, and more string-y configs:

proxies: {
   "Contacts.actions.search": "cordova/proxies/blackberry/contact_search",
   "Contacts.actions.save":   "cordova/proxies/blackberry/contact_save",
   "DirectoryEntry":          "cordova/proxies/blackberry/DirectoryEntry"
}

@purdrew
Copy link
Author

purdrew commented Feb 23, 2012

Yeah, was following the object-y pattern used by the platform.objects. 'path' is the module to load. Maybe just:

proxies: {
   "Contacts.search": "cordova/proxies/blackberry/Contacts.search",
   "Contacts.save":   "cordova/proxies/blackberry/Contacts.save",
   "DirectoryEntry":  "cordova/proxies/blackberry/DirectoryEntry"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment