#NEWLINE# def __call__( self , request , result , total , limit , offset ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'total' : total , #NEWLINE# 'result' : result , #NEWLINE# #UNINDENT# } #NEWLINE# first = self . first_link ( request , total , limit , offset ) #NEWLINE# if first : #NEWLINE# #INDENT# data [ 'first' ] = first #NEWLINE# prev = self . prev_link ( request , next , limit , offset ) #NEWLINE# if ( prev != first ) : #NEWLINE# #INDENT# data [ 'prev' ] = prev #NEWLINE# #UNINDENT# #UNINDENT# next = self . next_link ( request , total , limit , offset ) #NEWLINE# if next : #NEWLINE# #INDENT# last = self . last_link ( request , total , limit , offset ) #NEWLINE# if ( last != next ) : #NEWLINE# #INDENT# data [ 'next' ] = next #NEWLINE# #UNINDENT# data [ 'last' ] = last #NEWLINE# #UNINDENT# return data