Skip to content

Commit

Permalink
Merge pull request #10 from c88lopez/master
Browse files Browse the repository at this point in the history
Adding composer install availability feature
  • Loading branch information
KMHouk committed Feb 3, 2015
2 parents a4aaf9a + 8455c01 commit c219b9b
Show file tree
Hide file tree
Showing 44 changed files with 1,755 additions and 740 deletions.
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Created by .ignore support plugin (hsz.mobi)
### vim template
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~


### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties


### SublimeText template
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json


### Composer stuffs
vendor/
composer.lock
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "blockchain/blockchain",
"name": "Blockchain/Blockchain",
"description": "Blockchain API client library",
"keywords": ["bitcoin", "blockchain"],
"homepage": "https://github.com/blockchain/api-v1-client-php",
"license": "MIT",
"autoload": {
"psr-4": { "": "lib/" }
"psr-4": {
"Blockchain\\": "src/"
}
},
"require": {
"php": ">=5.3.0",
Expand Down
4 changes: 2 additions & 2 deletions example/create.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

$wallet = $Blockchain->Create->create('weakPassword01!');

Expand Down
4 changes: 2 additions & 2 deletions example/explorer.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

// List all blocks at a certain height
// var_dump($Blockchain->Explorer->getBlocksAtHeight(1));
Expand Down
4 changes: 2 additions & 2 deletions example/pushtx.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

// The raw transaction hex for a valid transaction, will not
// send though, since it's an existing transaction
Expand Down
4 changes: 2 additions & 2 deletions example/rates.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<body>
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

// Convert a fiat amount to BTC
$amount = $Blockchain->Rates->toBTC(500, 'USD');
Expand Down
4 changes: 2 additions & 2 deletions example/receive.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

// My receive address
$destination = '1Gr6Y7ZJEmZnbDwopWKJKRTri8fBymPDfg';
Expand Down
4 changes: 2 additions & 2 deletions example/stats.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

// Get Statistics
$stats = $Blockchain->Stats->get();
Expand Down
6 changes: 3 additions & 3 deletions example/wallet.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<pre><?php

require_once('../lib/Blockchain.php');
require_once(dirname(__DIR__) . '/vendor/autoload.php');

$api_code = null;
if(file_exists('code.txt')) {
$api_code = trim(file_get_contents('code.txt'));
}

$Blockchain = new Blockchain($api_code);
$Blockchain = new \Blockchain\Blockchain($api_code);

$wallet_guid = null;
$wallet_pass = null;
Expand All @@ -34,7 +34,7 @@
try {
// Uncomment to send
// var_dump($Blockchain->Wallet->send($address, "0.001"));
} catch (Blockchain_ApiError $e) {
} catch (\Blockchain\Exception\ApiError $e) {
echo $e->getMessage() . '<br />';
}

Expand Down
149 changes: 0 additions & 149 deletions lib/Blockchain.php

This file was deleted.

9 changes: 0 additions & 9 deletions lib/Blockchain/Exceptions.php

This file was deleted.

Loading

0 comments on commit c219b9b

Please sign in to comment.