Page 1 of 1

Slack Composer

Posted: Sun May 15, 2016 1:26 am
by KyleMassacre
Hello everyone,
I just want to start off by saying that I do love working with APIs and what I am here to show works with 2 different APIs. Well, one full API and kind of a half one since it's just a web hook. This is just kind of a neat little thing that I am working on for Slack and teams using the Slack application.

Basically in a nutshell what it does is pulls information from Packagist for a library that you and/or your team are interested in. From the first screen shot below you will notice that it uses the same syntax (except for the slash command) as using Composer with the CLI and you will see some of the features that I will be implementing. For now it's just the help command and the require command:
Help Command
Image
And here are a couple of the require commands. There is actually only one require command but this also takes an optional version constraint as seen in the above screen shot:
Require Command
Image
In that image I passed the --version flag in the command like

Code: Select all

/composer require laravel/laravel --version=5.1.x-dev
If you don't pass a version constraint it will default to the most current like so:
Image
At the time of writing this Laravel's latest version is dev-bindings (FUN FACT: which for those who care, is only like 1 day old ;))

So if anyone here uses Slack, I am more than willing to give the URL to this project that you can use while I develop it up more. It is hosted on a Heroku free node right now so you can get plenty of usage out of it since Heroku requires 6 hours of downtime per day.

Also, if you do have any projects up on Packagist and are looking to make a push in the near future and would be kind enough to add in the "extra" object an key named "img_url" with an image icon of your project, that would be mighty cool of you and let me know the project vendor/package name so I can test it out.

Code: Select all

"extra": {
    "img_url": "http:\/\/someplace.com\/some_image.png"
}

Re: Slack Composer

Posted: Wed May 18, 2016 1:54 pm
by hallsofvallhalla
Very cool.

Re: Slack Composer

Posted: Wed May 18, 2016 3:20 pm
by KyleMassacre
When this is all done I plan to do one for node modules as well to search the npm registry

Re: Slack Composer

Posted: Wed May 18, 2016 4:51 pm
by hallsofvallhalla
Oh I like that!