g0v / laweasyread

API for Taiwan Law
MIT License
16 stars 2 forks source link

List difference between two versions of a regulation #8

Open kong0107 opened 11 years ago

kong0107 commented 11 years ago

Input: /api/diff/{law_name}_{date_1}_{date_2} Output:

{
    'isSuccess': boolean,
    'reason': string,
    'diff': 
    {
        'earlyUpdate': date, // last update before or equal to $date_1
        'diffArticles': 
        [
            {
                'articleNumber': string, // like "34-1"
                'earlyVersion': string, // article contents at date 1
                'laterVersions': 
                [
                    {
                        'laterUpdate': date, // an update after $date_1 and before or equal to $date 2
                        'laterVersion': string // article contents at that date
                        'reason': string // reasons why this article is update on that date
                    }
                ]
            }
        ]
    }
}