Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Podio search all app configs for a given string
- input "Org ID" org
- input "string to search for" search_val
- global results = 0
- print "searching for " + search_val
- seartchOrg(org, search_val)
- print "DONE. Found " + results + " hits"
- end
- function seartchOrg(org, search_val) {
- spaces = podio_org_get_spaces(org)
- foreach ( spaces as space ) {
- if ( space.type == "emp_network" ) continue
- ini_set("max_execution_time", 30)
- searchSpace(space, search_val)
- }
- }
- function searchSpace(space, search_val) {
- apps = podio_space_get_apps(space.space_id)
- foreach ( apps as app ) {
- raw = podio_app_get_raw(app.app_id)
- json = json_encode(raw)
- // if we find a hit
- if ( stristr(json, search_val) ) {
- results = results + 1
- line = "App " + app.app_id + ' (<a'+' href="' + raw.link + '" target="_blank">'+raw.config.name+'</a>)'
- print line
- }
- }
- }
Add Comment
Please, Sign In to add comment