Bläddra i källkod

Agregado del metod getOauth para que haga las peticiones con las credenciales

gabriel 7 år sedan
förälder
incheckning
359a2bc285
1 ändrade filer med 22 tillägg och 0 borttagningar
  1. 22 0
      Services/Webservice.php

+ 22 - 0
Services/Webservice.php

@@ -406,4 +406,26 @@ class Webservice
         }
     }
 
+    /**
+     *  Similar a getData pero la request no hace authentication
+     *
+     * @param string $url
+     * @param array $filters
+     * @param array $order_by
+     * @param integer $limit
+     * @param integer $offset
+     *
+     * @return array
+     */
+    public function getOauth($url, $filters = array(), $order_by = array(), $limit = null, $offset = null)
+    {
+        $data = array();
+        try {
+            $url = $this->buildUrl($url, $filters, false, $order_by, $limit, $offset);
+            $data = json_decode($this->makeGetRequest($url), true);
+        } catch (\Exception $ex) {
+            $this->log($ex->getMessage(), 'error');
+        }
+        return $data;
+    }
 }