承接 infinityxtech/slack-api-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

infinityxtech/slack-api-laravel

最新稳定版本:v1.0.1

Composer 安装命令:

composer require infinityxtech/slack-api-laravel

包简介

Laravel wrapper for infinityxtech/slack-api-php

README 文档

README

This repository contains PHP classes for interacting with the Slack API. Below are links to documentation for each class:

SlackAuthProvider and SlackApiProvider Usage

To interact with the Slack API, you can use SlackAuth and SlackApi facades. Here's how you can set up and use them:

// Call this when you wish to redirect user to authorize with slack
SlackAuth::redirect();

// Call this on $redirectUrl when slack authorization redirect to $redirectUrl
$token = SlackAuth::getAccessToken(request('code'));

// Create a new SlackApiProvider instance with access token
SlackApi::setToken($token);

// Below this point, you can use various API methods:
SlackApi::channel()->someMethod();
SlackApi::user()->someMethod();
SlackApi::chat()->someMethod();
SlackApi::auth()->someMethod();
SlackApi::apps()->someMethod();
SlackApi::conversations()->someMethod();
SlackApi::files()->someMethod();
SlackApi::reactions()->someMethod();
SlackApi::reminders()->someMethod();
SlackApi::teams()->someMethod();
SlackApi::userGroups()->someMethod();
SlackApi::views()->someMethod();

Please replace the placeholders (SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_REDIRECT_URL) with your actual Slack app details. The redirectUrl must also be set within your Slack app configuration. After successful authentication and being redirected to the callback URL, you can obtain the access token.

You can then use the SlackApi facade to interact with various API methods from different classes within the repository.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-23