30
30
use Swift_SmtpTransport;
31
31
use Session;
32
32
use SoapBox\Formatter\Formatter;
33
+ use URL;
33
34
34
35
use Exception;
35
36
@@ -2330,6 +2331,28 @@ protected function claim_reason_code($code)
2330
2331
}
2331
2332
}
2332
2333
2334
+ protected function clinithink($text, $type)
2335
+ {
2336
+ $url = 'https://cloud.noshchartingsystem.com/noshapi/clinithink';
2337
+ $query['type'] = $type;
2338
+ if ($type == 'text') {
2339
+ $query['text'] = $text;
2340
+ }
2341
+ if ($type == 'crossmap') {
2342
+ $query['code'] = $text;
2343
+ }
2344
+ $message = http_build_query($query);
2345
+ $ch = curl_init();
2346
+ // $url = $url . "?" . $message;
2347
+ curl_setopt($ch, CURLOPT_URL, $url);
2348
+ curl_setopt($ch, CURLOPT_POST, 1);
2349
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $message);
2350
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
2351
+ $data = curl_exec($ch);
2352
+ curl_close($ch);
2353
+ return $data;
2354
+ }
2355
+
2333
2356
protected function closest_match($input, $compare_arr)
2334
2357
{
2335
2358
$shortest = -1;
@@ -9549,6 +9572,20 @@ protected function github_all()
9549
9572
return $result;
9550
9573
}
9551
9574
9575
+ protected function github_release()
9576
+ {
9577
+ $client = new \Github\Client(
9578
+ new \Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
9579
+ );
9580
+ $client = new \Github\HttpClient\CachedHttpClient();
9581
+ $client->setCache(
9582
+ new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
9583
+ );
9584
+ $client = new \Github\Client($client);
9585
+ $result = $client->api('repo')->releases()->latest('shihjay2', 'nosh2');
9586
+ return $result;
9587
+ }
9588
+
9552
9589
protected function github_single($sha)
9553
9590
{
9554
9591
$client = new \Github\Client(
@@ -9559,7 +9596,7 @@ protected function github_single($sha)
9559
9596
new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
9560
9597
);
9561
9598
$client = new \Github\Client($client);
9562
- $result = $commit = $ client->api('repo')->commits()->show('shihjay2', 'nosh2', $sha);
9599
+ $result = $client->api('repo')->commits()->show('shihjay2', 'nosh2', $sha);
9563
9600
return $result;
9564
9601
}
9565
9602
0 commit comments