Changeset 940993
- Timestamp:
- 06/30/2014 01:44:51 PM (12 years ago)
- Location:
- copify/trunk
- Files:
-
- 7 added
- 1 deleted
- 4 edited
- 1 moved
-
.travis.yml (added)
-
CopifyWordpress.php (deleted)
-
Lib/Api.php (moved) (moved from copify/trunk/Lib/Copify.php) (17 diffs)
-
Lib/CopifyWordpress.php (added)
-
README.md (modified) (1 diff)
-
Test (added)
-
Test/Lib (added)
-
Test/Lib/CopifyWordpressTest.php (added)
-
Views/CopifySettings.php (modified) (1 diff)
-
Views/CopifyViewJob.php (modified) (3 diffs)
-
basics.php (added)
-
copify.php (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
copify/trunk/Lib/Api.php
r913781 r940993 7 7 // Copyright 2012 Rob Mcvey. All rights reserved. 8 8 // 9 class Copify{9 class Api { 10 10 11 11 /** … … 80 80 $this->headers['Authorization'] = 'Bearer ' . $apiKey; 81 81 $this->headers['User-Agent'] = $apiEmail; 82 83 82 } 84 83 … … 92 91 $this->fullUrl = $this->basePath .'/' . $this->apiVersion . '/'. $this->resource . '.' . $this->format . $this->params; 93 92 } 94 93 95 94 /** 96 95 * Get a list of job records (20 per page) … … 125 124 return $this->makeRequest(); 126 125 } 127 126 128 127 /** 129 128 * Create a new job through the API … … 140 139 $this->resource = 'jobs'; 141 140 return $this->makeRequest($data); 142 } 141 } 143 142 144 143 /** … … 155 154 $this->resource = 'feedback'; 156 155 return $this->makeRequest($feedback); 157 } 156 } 158 157 159 158 /** … … 167 166 return $this->makeRequest(); 168 167 } 169 168 170 169 /** 171 170 * Get an array of availble job budgets/pricing … … 177 176 $this->resource = 'job_budgets'; 178 177 return $this->makeRequest(); 179 } 178 } 180 179 181 180 /** … … 196 195 } 197 196 return $this->makeRequest(); 198 } 197 } 199 198 200 199 /** … … 207 206 $this->resource = 'job_statuses'; 208 207 return $this->makeRequest(); 209 } 208 } 210 209 211 210 /** … … 219 218 return $this->makeRequest(); 220 219 } 221 220 222 221 /** 223 222 * Get a list of copywriters (20 per page) … … 233 232 return $this->makeRequest(); 234 233 } 235 234 236 235 /** 237 236 * View a single copywriter record … … 247 246 $this->resource = 'users/'.$id; 248 247 return $this->makeRequest(); 249 } 248 } 250 249 251 250 /** … … 257 256 **/ 258 257 public function makeRequest($data = null) { 259 260 258 if(!function_exists('curl_init')) { 261 259 throw new Exception('This Plugin requires PHP\'s cURL extension'); 262 260 } 263 264 261 // Build the URL 265 262 $this->setfullUrl(); … … 285 282 curl_setopt($curlyWurly, CURLOPT_POSTFIELDS, http_build_query($data)); 286 283 } 287 284 288 285 // Set the Authorization and User-Agent headers 289 286 foreach($this->headers as $key => $value) { … … 299 296 throw new Exception(curl_error($curlyWurly)); 300 297 } 301 298 302 299 // Bye bye curly wurly 303 300 curl_close($curlyWurly); … … 305 302 return $this->parseFormat($response); 306 303 } 307 304 308 305 /** 309 306 * Takes the raw response, returns an array or throws a huma readble exception -
copify/trunk/README.md
r905737 r940993 2 2 3 3 ## Copify Wordpress Plugin 4 5 [](https://travis-ci.org/copify/copify-wordpress/) 4 6 5 7 Automatically publish unique, relevant content every week from Copify's team of professional writers. -
copify/trunk/Views/CopifySettings.php
r909131 r940993 58 58 </select> 59 59 </div> 60 < ?php submit_button(); ?>60 <button class="CopifyButton CopifyGreen">Save Changes</button> 61 61 </fieldset> 62 62 </form> -
copify/trunk/Views/CopifyViewJob.php
r909714 r940993 203 203 <?php if(in_array($job['job_status_id'], array(1,2,6,7))) : // Job status info ?> 204 204 <div class="CopifyJobStatusInfo message"> 205 <h3><?php echo sprintf('Your order is <span class="%s">%s</span>. What happens next?' , $statusNameClass, $statusName); ?></h3>205 <h3><?php echo sprintf('Your order is <span class="%s">%s</span>. What happens next?', $statusNameClass, $statusName); ?></h3> 206 206 <p>Your order has been placed with an approved Copify writer, for now sit back and relax!</p> 207 <p>When your order is complete, you will be notified by email and you will have chance to review the content before you publish it </p>207 <p>When your order is complete, you will be notified by email and you will have chance to review the content before you publish it.</p> 208 208 <ul> 209 <li><span class="open">Open</span> - Your order is in the queue for the next availa lbe writer</li>209 <li><span class="open">Open</span> - Your order is in the queue for the next available writer</li> 210 210 <li><span class="in_progress">In progress</span> - A writer is working on your content, you will receive an email once complete</li> 211 211 <li><span class="completed">Completed</span> - Your content is ready for you to approve</li> … … 399 399 jQuery('#CopifyConfirmSaving').hide(); 400 400 //console.log(data); 401 window.location.href = window.location.href + '&flashMessage= Job+approved+and+moved+to+Drafts';401 window.location.href = window.location.href + '&flashMessage=Order+approved+and+moved+to+Drafts'; 402 402 } else { 403 403 alert(data.message); … … 434 434 if(data.status == 'success') { 435 435 // OK 436 window.location.href = window.location.href + '&flashMessage= Job+moved+to+Drafts';436 window.location.href = window.location.href + '&flashMessage=Order+moved+to+Drafts'; 437 437 } else { 438 438 alert(data.message); -
copify/trunk/readme.txt
r909714 r940993 1 1 === Copify === 2 Version: 1.0. 42 Version: 1.0.5 3 3 Contributors: robmcvey 4 4 Tags: blog writers, automatic blogging, post writers, auto blogging, content, copywriting, copywriters, blogging, writers, writing, seo
Note: See TracChangeset
for help on using the changeset viewer.