{"id":13764467,"url":"https://github.com/brbester/pyCiscoSpark","last_synced_at":"2025-05-10T19:31:15.970Z","repository":{"id":93310342,"uuid":"48495460","full_name":"brbester/pyCiscoSpark","owner":"brbester","description":"Python Library to Interface to Cisco Spark REST API","archived":false,"fork":false,"pushed_at":"2017-11-16T18:12:39.000Z","size":49,"stargazers_count":30,"open_issues_count":1,"forks_count":17,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-17T00:33:38.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brbester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-12-23T14:48:00.000Z","updated_at":"2019-04-17T19:30:42.000Z","dependencies_parsed_at":"2024-01-30T07:15:11.498Z","dependency_job_id":null,"html_url":"https://github.com/brbester/pyCiscoSpark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brbester%2FpyCiscoSpark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brbester%2FpyCiscoSpark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brbester%2FpyCiscoSpark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brbester%2FpyCiscoSpark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brbester","download_url":"https://codeload.github.com/brbester/pyCiscoSpark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253470782,"owners_count":21913733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:00:21.055Z","updated_at":"2025-05-10T19:31:15.734Z","avatar_url":"https://github.com/brbester.png","language":"Python","funding_links":[],"categories":["Client SDKs"],"sub_categories":["REST API clients"],"readme":"# pyCiscoSpark\n==============\n\nPython Library to Interface to Cisco Spark REST API\n---------------------------------------------------\nusing requests \u003e2.4 - install instructions here:\nhttp://docs.python-requests.org/en/latest/user/install/\n\nat = personal Access Token (see https://developer.ciscospark.com/getting-started.html)\n\nBasically call the functions below and get a Python dictionary of the JSON back. You can then print the raw dictionary and choose the specific return fields you want to parse.\n\nThis is an example of getting a Display Name from the Spark API from the personID:\n\n`resp_dict2=pyCiscoSpark.get_persondetails(accesstoken,personid)`\n\n`print resp_dict2['displayName']`\n\n\n\n## Examples\n###example.py\nPython example to show room members and print the text messages in a specified room\nexecute via \"python example.py access_token_string\"\n\n###example2.py\nSearches for a specified room and then posts a designated message\n\n###createwebhook.py\ncreates webhook to watch for new messages in a room\n\n### ciscospark.php\nSample PHP script to receive notifications from created webhook\n\n### sparkmess.py\nSample python script to act on notifications by posting a message back to room in response (bot example)\n\n### sparkgoogle.py\nSample \"bot\" script. prefix a query or question with Google in a room and it responds with top 2 Google search results and links.  Requires ciscospark.php or similar to call it in response to created webhook.\n\n## Follows: https://developer.ciscospark.com/quick-reference.html\n### get_people(at,email,displayName,max):\nList People in your Organization - max default is 10\nyou need to enter an email or displayName or Spark will send an error\n\n### get_persondetails(at,personId):\nGet Person Details\n\n### get_me(at):\nGet your Details\n\n### get_rooms(at):\nGet a list of rooms in which you are a member\n\n### get_room(at,roomId):\nGet room details\n\n### get_memberships(at):\nGet membership list\n\n### get_membership(at,membershipId):\nGet membership details\n\n### get_messages(at,roomId):\nGet list of messages\n\n### get_message(at,messageId):\nGet details of a specific message - useful for reading the text\n\n### get_webhooks(at):\nlist registered webhooks\n\n### get_webhook(at,webhookId):\nget webhook info\n\n### post_createroom(at,title):\nCreate a room with title\n\n### post_message(at,roomId,text):\nPost a message to a room (text only right now - see post_file)\n\n### post_file(at,roomId,url):\nPosts a file to a room\n\n### post_membership(at,roomId,personEmail,isModerator=True):\nAdd a person to a room\n\n### post_webhook(at,name,targetUrl,resource,event,filter):\nCreate a webhook\n\n### put_room(at,roomId,title):\nChange a room's title\n\n### put_membership(at,membershipId,isModerator):\nchange a member's moderator status\n\n### put_webhook(at,webhookId,name,targetUrl):\nChange the targetURL or name for a webhook\n\n### del_room(at,roomId):\nDelete a room\n\n### del_membership(at,membershipId):\nLeave a room\n\n### del_message(at,messageId):\nDelete a message\n\n### del_webhook(at,webhookId):\nDelete a webhook\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrbester%2FpyCiscoSpark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrbester%2FpyCiscoSpark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrbester%2FpyCiscoSpark/lists"}