{"id":13764358,"url":"https://github.com/akalinux/cisco_spark-perl","last_synced_at":"2026-01-18T09:26:52.844Z","repository":{"id":219883069,"uuid":"124022846","full_name":"akalinux/cisco_spark-perl","owner":"akalinux","description":"Cisco Spark AnyEvent Implementation for perl","archived":false,"fork":false,"pushed_at":"2023-03-11T07:52:10.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-17T00:33:36.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akalinux.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-03-06T04:55:18.000Z","updated_at":"2021-12-28T00:12:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"05362064-afcd-400a-ae12-c932b3906709","html_url":"https://github.com/akalinux/cisco_spark-perl","commit_stats":null,"previous_names":["akalinux/cisco_spark-perl"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalinux%2Fcisco_spark-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalinux%2Fcisco_spark-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalinux%2Fcisco_spark-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalinux%2Fcisco_spark-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akalinux","download_url":"https://codeload.github.com/akalinux/cisco_spark-perl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253470651,"owners_count":21913707,"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:19.451Z","updated_at":"2026-01-18T09:26:52.826Z","avatar_url":"https://github.com/akalinux.png","language":"Perl","funding_links":[],"categories":["Client SDKs"],"sub_categories":["REST API clients"],"readme":"\n# Cisco SparkBot implementation\n\nThis bundle includess the following libraries:\n\n| Module | Function |\n|--------|----------|\n| AnyEvent::SparkBot | Asyncrnous AnyEvent loop implementation of the Spark Bot |\n| AnyEvent::HTTP::Spark | Dual Nature Syncrnous/Asyncrnous AnyEvent friendly Spark v1 HTTP Client library |\n| AnyEvent::SparkBot::SharedRole | Shared library used by AnyEvent::SparkBot and AnyEvent::HTTP::Spark |\n\nOnce installed it you should be able to use perldoc to view the pod.\n\n## Basic Example\n\nThis example shows how to connect to spark and respond to text messages.\n```\nuse Modern::Perl;\nuse Data::Dumper;\nuse AnyEvent::SparkBot;\nuse AnyEvent::Loop;\n$|=1;\n\nmy $obj=new AnyEvent::SparkBot(token=\u003e$ENV{SPARK_TOKEN},on_message=\u003e\\\u0026cb);\n\n$obj-\u003eque_getWsUrl(sub { $obj-\u003estart_connection});\n$obj-\u003eagent-\u003erun_next;\nAnyEvent::Loop::run;\n\nsub cb {\n  my ($sb,$result,$eventType,$verb,$json)=@_;\n  return unless $eventType eq 'conversation.activity' and $verb eq 'post';\n  if($result) {\n    my $data=$result-\u003eget_data;\n    my $response={\n      roomId=\u003e$data-\u003e{roomId},\n      personId=\u003e$data-\u003e{personId},\n      text=\u003e\"ya.. ya ya.. I'm on it!\"\n    };\n    print Dumper($data);\n    $sb-\u003espark-\u003eque_createMessage(sub {},$response);\n    $sb-\u003eagent-\u003erun_next;\n  } else {\n    print \"Error: $result\\n\";\n  }\n}\n```\n\n## To Build:\n```\n  perl MakeFile.PL\n  make\n  make test\n  make install\n```\n\n## For more extensive unit testing\n\nIf you want to test this object with your token\n```\n  export SPARK_TOKEN=myToken\n  export TEST_USER='Firstname LastName'\n  export RUN_HTTP_TESTS=1\n  export TEST_USER_WC='User%'\n  export TEST_EMAIL='User%'\n  export TEST_PERSON_ID=xxxxx\n  export TEST_MSG_ID=xxx\n  export TEST_TEAM=TeamX\n  export TEST_ROOM=RoomX\n  perl MakeFile.PL\n  make\n  make test\n  make install\n```\n\n# Licence\n\nThe Perl 5 License (Artistic 1 \u0026 GPL 1 or later)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakalinux%2Fcisco_spark-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakalinux%2Fcisco_spark-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakalinux%2Fcisco_spark-perl/lists"}