Jump to content


Gamification and REST API

rest api gamification

  • Please log in to reply
1 reply to this topic

#1 dragosu



  • Members
  • Pip
  • 5 posts

Posted 24 April 2014 - 11:46 AM



I have a question:


Can be the gamification disabled when making calls to the REST API?


I have tested with a few calls to create a single account entry, logged the MySQL queries and (for such a small task - login & create one account) there is a huge list of generated queries.


Most of the queries (80% I would say) relate to the `game***` tables.


There are a few like:


9 Query select id from gamepointtransaction where gamepoint_id = 5
9 Query SELECT * FROM `gamepointtransaction` WHERE ( `id`  IN ( '40','47','52','53','75','77','79','82','84','87','89','92','95','97','99','101','103','105',



... and here continues for a few screens of ID's list - bad bad way to write a query !?


There is a huge performance penalty added by those queries when I just want to add a new account entry by using the REST API.


Note that the cache was enabled.

#2 dragosu



  • Members
  • Pip
  • 5 posts

Posted 24 April 2014 - 01:06 PM

I think I found something in BeginRequestBehaviour:


public function handleDisableGamification($event)
            Yii::app()->gamificationObserver->enabled = false;


Is there a missing


Yii::app()->gameHelper->enabled = false;



Also tagged with one or more of these keywords: rest, api, gamification

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users