Source

eggDiscover / followerslookup / templates / how-to.html

Full commit
{% extends "base.html"  %}

{% block precontent  %}
<div>
<h1>How To Use this app</h1>
<p>This application let you query with GET parameters.The main url to
  query is <a href='/users/lookup'>/users/lookup/</a> resulting in a
  csv file you can download.
</p>
<h2>Paginate</h2>
<p>
Results are always paginated by 100 users. To get a specific page, you
can use the page parameter.
</p>
<p>
Exemple : <a href="/users/lookup/?page=2">/users/lookup/?page=2</a>
</p>
<h2>Usefull parameters</h2>
<ul>
  <li>
    Created date
    <ul>
      <li>
	To get users created <b>before</b> a certain date, use <a href="/users/lookup/?created_at__lte=2012-02-10">/users/lookup/?created_at__lte=2012-02-10</a>
      </li>
      <li>
To get users created <b>after</b> a certain date, use <a href="/users/lookup/?created_at__gte=2012-02-10">/users/lookup/?created_at__gte=2012-02-10</a>
      </li>
      <li>
To get users created <b>at</b> a certain date, use <a href="/users/lookup/?created_at=2012-02-10">/users/lookup/?created_at=2012-02-10</a>
      </Li>
    </ul>
  </li>
  <li>
    Status count
    <ul>
      Status count is the number of tweets a user emited. 
      <li>
	To get
	user with <b>less</b> than 10 tweets, you can use
	: <a href="/users/lookup/?statuses_count__lte=10">/users/lookup/?statuses_count__lte=10</a>
      </li>
      <li>
	To get user with <b>more</b> than 10 tweets, you can use
	: <a href="/users/lookup/?statuses_count__gte=10">/users/lookup/?statuses_count__gte=10</a>
      </li>
      <li>
	To get user with <b>exactly</b>10 tweets, you can use
	: <a href="/users/lookup/?statuses_count=10">/users/lookup/?statuses_count=10</a>
      </li>
    </ul>
  <li>
      Friends count
      <ul>
	Friends count is the number of account a user follow
	<li>
	  To get
	user with <b>less</b> than 10 friends, you can use
	: <a href="/users/lookup/?friends_count__lte=10">/users/lookup/?friends_count__lte=10</a>
	</li>
	<li>
	To get user with <b>more</b> than 10 friends, you can use
	: <a href="/users/lookup/?statuses_count__gte=10">/users/lookup/?friends_count__gte=10</a>
      </li>
	<li>
	To get user with <b>exactly</b>10 friends, you can use
	      : <a href="/users/lookup/?statuses_count=10">/users/lookup/?friends_count=10</a>
	</li>
      </ul>
    </li>
    <li>
      Followers count
    <ul>
      Followers count is the number of account following this user
      <li>
	  To get
	user with <b>less</b> than 10 followers, you can use
	: <a href="/users/lookup/?followers_count__lte=10">/users/lookup/?followers_count__lte=10</a>
	</li>
	<li>
	To get user with <b>more</b> than 10 followers, you can use
	: <a href="/users/lookup/?followers_count__gte=10">/users/lookup/?followers_count__gte=10</a>
      </li>
	<li>
	To get user with <b>exactly</b>10 followers, you can use
	      : <a href="/users/lookup/?followers_count=10">/users/lookup/?followers_count=10</a>
	</li>
    </ul>
  </li>
  <li>
    User description
    <ul>
      Only two type of query are usefull here empty or not
      <li>To get users where description is <b>not</b> empty use 
	<a href="/users/lookup/?description__isnull=false">/users/lookup/?description__isnull=false</a>
      </li>
      <li>
	To get users where description <b>is</b>empty use 
	<a href="/users/lookup/?description__isnull=true">/users/lookup/?description__isnull=true</a>
      </li>
    </ul>
  </li>
  <li>
    Profile Picture
    <ul>
      Only two type of picture is usefull : default picture (ie. the
      eggs) or a custom one
      <li>
	To Get users with default picture (eggs) : <a href="/users/lookup/?picture=false">/users/lookup/?picture=false</a>
      </li>
      <li>
	To Get users with custom picture : <a href="/users/lookup/?picture=true">/users/lookup/?picture=true</a>
      </li>
    </ul>
  </li>

  
</ul>
<h2>Ordering</h2>
Each request can be ordered on a particulat field. choices are :
<ul>
<li>screen_name : the display name on twitter</li>
<li>name : the "real name"</li>
<li>created_at : the date the account were created</li>
<li>and so on...</li>
</ul>
<p>
To order à request use the request parameter at the end of the get
parrameters exemple
: <a href="/users/lookup/?picture=true&order_by=created_at">/users/lookup/?picture=true&order_by=created_at</a>
</p>
<p>
To order in reverse order use "-"
exemple: <a href="/users/lookup/?picture=true&order_by=-created_at">/users/lookup/?picture=true&order_by=-created_at</a>
</p>
<h2>Mix everything together</h2>
<p>You can filter as mutch as you want and get paginated results. For
  exemple, if you want user older than 2012-01-01, with default
  picture, no description, no tweets, no followers and only a friends
  ordered by created_at :
  <a href="/users/lookup/?created_at__lte=2012-01-01&picture=false&description__isnull=true&statuses_count=0&friends_count=1&followers_count=0">
/users/lookup/?created_at__lte=2012-01-01&picture=false&description__isnull=true&statuses_count=0&friends_count=1&followers_count=0
</a>

</p>
<h2>Specifying a user</h2>
<p>
To get user following a particular twitter user use the username in
the url. For exemple, to get NicolasSarkozy followers :
<a href="/users/lookup/NicolasSarkozy/">/users/lookup/NicolasSarkozy/</a>
All query parameters are usable. At the time of writing
account selectable are :
<ul> 
  <li>NicolasSarkozy</li>
  <li>evajoly</li>
  <li>PhilippePoutou</li>
  <li>MLP_officiel</li>
  <li>bayrou</li>
  <li>melenchon2012</li>
  <li>fhollande</li>
</ul>
</p>
</div>
{% endblock precontent %}