A simple Meteor package for the avatars.io npm module.
Using Meteor's Package System:
-
Make a new directory named
packages
in the root of your app directory (if needed).$ mkdir packages
-
Copy the contents of this repository to a folder named
avatars.io
. We usegit clone
to simplify this process.$ git clone git@github.com:logankoester/meteor-avatars-io.git avatars.io
-
Tell your Meteor app about the new package.
$ meteor add avatars.io
Using Meteorite:
$ mrt add avatars.io
Server-side only.
The same as in the Avatars.IO for Node docs (https://github.com/chute/avatars-io-node).
if (Meteor.isServer) {
AvatarsIO.appId = "anything";
AvatarsIO.accessToken = "exampleToken";
result = AvatarsIO.upload("avatar.jpeg", function(err, url){
console.log(url);
});
}