Compare commits

..

3 Commits

Author SHA1 Message Date
69ef50f69c 0.0.2 2016-04-27 03:08:23 +02:00
71dcdd0d66 now returning promises 2016-04-27 03:08:14 +02:00
229b652c69 add lossless badge 2016-04-27 02:27:52 +02:00
5 changed files with 44 additions and 10 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016 Push.Rocks
Copyright (c) 2016 Lossless GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,10 +1,11 @@
# cflare
allows you to manage cloudflare from CoreOS
allows you to manage multiple cloudflare accounts.
> Note: this package is still in alpha, so some things do not yet work.
I (Phil from Lossless) expect this package to be ready 1. of June 2016.
## Status
[![Build Status](https://travis-ci.org/pushrocks/cflare.svg?branch=master)](https://travis-ci.org/pushrocks/cflare)
## Usage
@ -17,9 +18,14 @@ cflareInstance.auth({
key:""
});
cflareInstance.createRecord();
cflareInstance.removeRecord();
cflareInstance.copyRecord();
cflareInstance.listRecords();
cflareInstance.listDomains();
cflareInstance.createRecord(); // returns promise with resolve function getting the response;
cflareInstance.removeRecord(); // returns promise with resolve function getting the response;
cflareInstance.copyRecord(); // returns promise with resolve function getting the response;
cflareInstance.listRecords(); // returns promise with resolve function getting the response;
cflareInstance.listDomains(); // returns promise with resolve function getting the response;
```
### About the authors:
[![Project Phase](https://mediaserve.lossless.digital/lossless.com/img/createdby_github.svg)](https://lossless.com/)
[![Gitter](https://img.shields.io/badge/Support%20us-PayPal-blue.svg)](https://paypal.me/lossless)

View File

@ -1,6 +1,6 @@
{
"name": "cflare",
"version": "0.0.1",
"version": "0.0.2",
"description": "cloudflare management for CoreOS",
"main": "dist/index.js",
"scripts": {
@ -22,6 +22,7 @@
"homepage": "https://github.com/pushrocks/cflare#readme",
"dependencies": {
"beautylog": "^4.1.2",
"q": "^1.4.1",
"request": "^2.72.0"
},
"devDependencies": {

View File

@ -5,8 +5,34 @@ import helpers = require("./cflare.classes.helpers");
class cflare {
private authEmail:string;
private authKey:string;
private authCheck(){
return (this.authEmail && this.authKey); //check if auth is available
}
constructor(){
};
auth(optionsArg:{email:string,key:string}){
this.authEmail = optionsArg.email;
this.authKey = optionsArg.key;
}
createRecord(){
let done = plugins.q.defer();
return done.promise;
};
removeRecord(){
let done = plugins.q.defer();
return done.promise;
};
listRecords(){
let done = plugins.q.defer();
return done.promise;
}
listDomains(){
let done = plugins.q.defer();
return done.promise;
};
request(){
let done = plugins.q.defer();
return done.promise;
}
};

View File

@ -1,3 +1,4 @@
/// <reference path="./typings/main.d.ts" />
export let beautylog = require("beautylog");
export let q = require("q");
export let request = require("request");