GithubHelp home page GithubHelp logo

codeigniter-appcelerator's People

Contributors

benedmunds avatar tjoosten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

codeigniter-appcelerator's Issues

Query Custom Objects

I am just enquiring to see if there is a way of checking custom objects with the same functions?

Solved: $output = $this->appcelerator->send_request('objects/:class_name/query.json', 'GET', $data);

Regarding search for friends

Could anyone help regarding making a search request for users friends. Am I doing this correctly?

$this->load->helper('url');

/* Intergrate Appcelerator */
$this->load->library('appcelerator');
$this->appcelerator->init($this->app_key, $this->email, $this->password);

$data = array('user_id' => '*******************',);

$output = $this->appcelerator->send_request('friends/search.json', 'GET', $data);

I am getting the following output

stdClass Object
(
[meta] => stdClass Object
(
[status] => fail
[code] => 404
[message] => Failed to authenticate user
)

)

Make the protected $email and $password changeable and global

There was an issue where the user login details needing to be changed based on different users, plus I also noticed every time I had to get/post json data from Appcelerator I had to keep calling the login (users/login.json), which kept on creating a new cookie.txt.

protected $email = '[email protected]';
protected $password = 'password';

I have changed the following in the appcelerator.php file

1. First changed:

protected $cookie = '/tmp/appccookie';

to

protected $cookie = 'tmp/appccookie';

2. In the __construct changed

$this->cookie .= time() . '.txt';

to

$CI =& get_instance();
$CI->load->library('session');
$this->cookie .= $CI->session->userdata('session_id') . '.txt';

3. Noted out:

/* if ($this->_logged_in === FALSE)
{
$login = $this->_login($this->email, $this->password);
if ($login == FALSE)
{
return json_decode($this->_errors);
}
} */

I would also suggest making a longer $config['sess_time_to_update'] in the config.php file or $config['sess_time_to_update'] = $config['sess_expiration'];

Works great… hope you finds it useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.