Skip to content

Commit cdd434c

Browse files
christohillgegere
authored andcommitted
Update README.md
Added a second example for users using the token auth type to distinguish the difference between api_* and consumer_* config values
1 parent 39c431c commit cdd434c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,48 @@ $Checkfront = new Checkfront(
7979

8080
#### Token Access
8181

82+
##### OAuth2 Access
83+
84+
```php
85+
<?
86+
$Checkfront = new Checkfront(
87+
array(
88+
'host'=>'your-company.checkfront.com',
89+
'consumer_key' => '5010076404ec1809470508',
90+
'consumer_secret' => 'ba0a5c0c509445024c374fcd264d41e816b02d4e',
91+
'redirect_uri'=>'oob',
92+
)
93+
);
94+
?>
95+
```
96+
97+
##### Token Access
98+
8299
```php
83100
<?php
84101
$Checkfront = new Checkfront(
102+
<<<<<<< HEAD
85103
array(
86104
'host'=>'your-company.checkfront.com',
87105
'auth_type' => 'token',
88106
'api_key' => '5010076404ec1809470508',
89107
'api_secret' => 'ba0a5c0c509445024c374fcd264d41e816b02d4e',
90108
));
109+
=======
110+
array(
111+
'host'=>'your-company.checkfront.com',
112+
'auth_type' => 'token',
113+
'api_key' => '5010076404ec1809470508',
114+
'api_secret' => 'ba0a5c0c509445024c374fcd264d41e816b02d4e',
115+
)
116+
);
117+
>>>>>>> 04fe00c... Update README.md
91118
?>
92119
```
93120

94121
#### PHP Examples
95122
```php
123+
<<<<<<< HEAD
96124
<?php
97125
// Get items rates and availbility
98126
$items = $Checkfront->get('item',array(
@@ -110,6 +138,14 @@ public function query_booking()
110138
}
111139

112140
print_r(query_booking() );
141+
=======
142+
<?
143+
/* Get items rates and availbility*/
144+
$Checkfront->get('item',array(
145+
'start_date'=>date('Y-m-d'),
146+
'end_date'=>date('Y-m-d',strtotime('+3 days'))
147+
));
148+
>>>>>>> 04fe00c... Update README.md
113149
?>
114150
```
115151

0 commit comments

Comments
 (0)