Skip to main content
edited tags
Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
added 107 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:

  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key
Here are a few assumptions that I am inferring from the available information:
  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

No. and with clarification found in comment on accepted answer, understandably so.

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:

  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:
  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

No. and with clarification found in comment on accepted answer, understandably so.

added 44 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:

  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:

  1. the key for rep_change is post_id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

I am trying to determine the most efficient way to keep a user's rep_change history updated and need some guidance.

Here are a few assumptions that I am inferring from the available information:

  1. the key for rep_change is post_id and user_id along with an implied site id
  2. the on_date field is bumped when a rep related event for that post_id occurs

So, if I initialize a rep table with the user's complete rep history and save the time of the update, I can subsequently query /users/{id}/reputation with a fromdate equal to the last update and the results will contain all items that have had a rep change since fromdate - even if they have been returned in a previous update.

i.e.

  • post #10 got a few upvotes when created last year and was entered into my local rep table at that time.
  • the past xx number of rep updates have not contained that postid
  • today, someone found post #10 and upvoted it and the on_date and positive_rep are updated
  • the next time I query rep post #10 will be in the results and I can update the rep table using post_id (and user_id and contrived site_id) as key

Is this an accurate description?

Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading